# Custom MDP with RL4J

**URL:** <https://community.konduit.ai/t/custom-mdp-with-rl4j/64>\
**Category:** RL4J\
**Created:** [January 6, 2020, 8:23am UTC](https://community.konduit.ai/t/custom-mdp-with-rl4j/64 "2020-01-06T08:23:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![diane](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@diane](https://community.konduit.ai/u/diane)\
**Post date:** [January 6, 2020, 8:23am UTC](https://community.konduit.ai/t/custom-mdp-with-rl4j/64/1 "2020-01-06T08:23:18Z")

</div>

How do I implement a custom MDP with RL4J?

---

<div class="post-metadata">

**Author:** ![saudet](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/saudet/32/69_2.png) [@saudet](https://community.konduit.ai/u/saudet)\
**Post date:** [January 20, 2020, 2:16am UTC](https://community.konduit.ai/t/custom-mdp-with-rl4j/64/2 "2020-01-20T02:16:22Z")

</div>

We simply need to implement the MDP interface. We can use existing ones as templates:  
[https://github.com/eclipse/deeplearning4j/blob/master/rl4j/rl4j-ale/src/main/java/org/deeplearning4j/rl4j/mdp/ale/ALEMDP.java](https://github.com/eclipse/deeplearning4j/blob/master/rl4j/rl4j-ale/src/main/java/org/deeplearning4j/rl4j/mdp/ale/ALEMDP.java)  
[https://github.com/eclipse/deeplearning4j/blob/master/rl4j/rl4j-gym/src/main/java/org/deeplearning4j/rl4j/mdp/gym/GymEnv.java](https://github.com/eclipse/deeplearning4j/blob/master/rl4j/rl4j-gym/src/main/java/org/deeplearning4j/rl4j/mdp/gym/GymEnv.java)  
etc.
