A quick example of Q-Learning in a 2D environment
Under src/ there are 2 examples
run.cr -- see how the game is played manually.
run_q.cr -- run the QLearning agent on the game.
To run the examples you need Crystal
Other then that just run crystal run run*.cr and see it plays