Example #1
0
def write_cache(graph_input):
    fileio().set_File_Name(fileio().root_path(
        "/tool/{}".format("graph.cache")))
    fileio().write_file("{},{},{},{},{}\n".format(
        graph_input["episode"], graph_input["steps"],
        graph_input["cumulative_rewards"], graph_input["epsilon"],
        graph_input["initial_state"]))
Example #2
0
def write_for_graph(graph_input, filename):
    fileio().set_File_Name(fileio().root_path("/data/{}.DAT".format(filename)))
    print("{},{},{},{},{}".format(graph_input["episode"], graph_input["steps"],
                                  graph_input["cumulative_rewards"],
                                  graph_input["epsilon"],
                                  graph_input["initial_state"]))
    fileio().write_file("{},{},{},{},{}\n".format(
        graph_input["episode"], graph_input["steps"],
        graph_input["cumulative_rewards"], graph_input["epsilon"],
        graph_input["initial_state"]))
Example #3
0
def flush_cache():
    fileio().set_File_Name(fileio().root_path(
        "/tool/{}".format("graph.cache")))
    fileio().file_flush()