Comparison of different reinforcement learning algorithms on different game environments.
To run an algorithm on a particular environment, simply run python .\test_algorithm.py --task "Twenty48_instert_version"
e.g. to run the dqn algorithm for the Twenty48stoch-v0 environment run python .\test_dqn.py --task "Twenty48stoch-v0"
.
The standard implementation for a game of 2048 (stochastic environment).
The same tile movement mechanics as v0 but all randomness removed (deterministic environment).
To access analytics relating to the training efficiency of an algorithm on a particular version run tensorboard --logdir .\log\Twenty48_instert_version\insert_algorithm
e.g. to access the analysis for the dqn algorithm for the Twenty48stoch-v0 environment run tensorboard --logdir .\log\Twenty48stoch-v0\dqn
.
The reward is calculated as per the standard implementation of 2048. After a move, the resulting tile values from the newly merged tiles are summed and that becomes the reward for that step. Additionally, any move that does not change the state is rewarded with a negative reward (-0.1).
A file called manual_instance.py is provided to easily test the functionality of the game environment.