Skip to content

SeanNaren/QlearningExample.torch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QlearningExample.torch

TorchPlaysCatch

Torch plays catch! Based on Eder Santanas' implementation in keras. Highly recommend reading his informative and easy to follow blog post here.

Agent has to catch the fruit before it falls to the ground. Agent wins if he succeeds to catch the fruit, loses if he fails.

Dependencies

To install torch7 follow the guide here.

Other dependencies can be installed via luarocks:

luarocks install optim
luarocks install image

How to run

To train a model, run the Train.lua script. You can configure parameters such as below:

th Train.lua -epoch 1000 #Configures the number of epochs. More parameters are available, check scrip.t

Visualization

To visualise the agent playing the game after training a model, use the TorchPlaysCatch.lua script using qlua rather than th as below:

qlua TorchPlaysCatch.lua

Much like the train script, there are configurable options. Check the script for more details!

Acknowledgements

Eder Santana, Keras plays catch, (2016), GitHub repository, https://gist.github.com/EderSantana/c7222daa328f0e885093

About

Implementation of a simple example of Q learning in Torch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages