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"]))
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"]))
def flush_cache(): fileio().set_File_Name(fileio().root_path( "/tool/{}".format("graph.cache"))) fileio().file_flush()