예제 #1
0
                    "episode: {}/{}, score: {}, e's: {}\nNumber of Controller breaks : {}"
                    .format(episode, EPISODES, running_meta_reward, epsilon,
                            no_controller_breaks))

                print("The state is : ", meta_end_state)
                break

            confidence_state = next_confidence_state

        if episode % 200 == 0:
            print("Episodes : {}".format(episode))
            # Saving the progress
            print("Saving")
            # convert this to save model for each policy
            MetaAgent.save(filename)
            # agent.saveController(fileController)
            sleep(0.2)
            print("Done Saving You can Now Quit")
            sleep(1)


if __name__ == "__main__":
    if args['set_gpu'] is not None:
        print("Using the GPU ")
        DQNAgent.setup_gpu(int(args['set_gpu']))
    else:
        print("{LOG} Using the CPU for Computation")
        pass

    main()
예제 #2
0
                    "episode: {}/{}, score: {}, e's: {}\nNumber of Controller breaks : {}"
                    .format(episode, EPISODES, running_reward, epsilon,
                            no_controller_breaks))

                print("The state is : ", meta_end_state)
                break

            confidence_state = next_confidence_state

        if episode % 200 == 0:
            print("Episodes : {}".format(episode))
            # Saving the progress
            print("Saving")
            # convert this to save model for each policy
            MetaAgent.save(filename)
            # agent.saveController(fileController)
            sleep(0.2)
            print("Done Saving You can Now Quit")
            sleep(1)


if __name__ == "__main__":
    if args['set_gpu'] is not None:
        print("Using the GPU ")
        DQNAgent.setup_gpu(str(args['set_gpu']))
    else:
        print("{LOG} Using the CPU for Computation")
        pass

    main()