schrum2 / MM-NEATv2

MM-NEAT version 2.0 is no longer supported. Please get MM-NEAT 3+ from https://github.com/schrum2/MM-NEAT
Other
11 stars 5 forks source link

Make action labels in RL Glue less generic #119

Closed schrum2 closed 8 years ago

schrum2 commented 8 years ago

Currently, all RL Glue environments generally just use the RLGlueTask as a generic task that handles them all the same.However, a consequence of this is that the network output/action labels are simply Action 0, Action 1, etc. However, this can be easily fixed in the following way.

For all RL glue environments, make a corresponding task (eg TetrisTask) that extends the RLGlueTask. Then, simply override the outputLabels() method. You may need to search the code and/or internet a bit to find what the actions in these tasks are, but they are fairly well known tasks.

Once you do this, modify all RL Glue batch files to launch the specific domain task instead of the generic RLGlueTask.

schrum2 commented 8 years ago

When you do this, you can also remove all of the domain specific code from the RLGlueTask. For example, you can override the number of other scores so that Tetris always has your new other scores, and the multiobjective Tetris options can be declared here instead of in the RLGlueTask

Serenamidori commented 8 years ago

Each game now has its own specific task class and all the domain specific code from RLGlueTask has been moved over. All of them are tested with their new batch files and they all run and show their correct labels in the post watch.