MineRL Reinforcement Learning with REINFORCE
This project uses the MineRL library for reinforcement learning in the Minecraft environment. It includes code to train an agent in the MineRLObtainDiamondShovel-v0 environment. The agent learns using the REINFORCE algorithm, a policy gradient method, to accomplish tasks and interact with the Minecraft world.
- Python 3.9.16
- Gym
- Minerl
- Torch
- Matplotlib
- NumPy
-
Install Java Development Kit (JDK) 8:
https://www.oracle.com/java/technologies/downloads/#java8-windows
Follow the link and install JDK 8. Install x64 Version.
-
Install Python dependencies:
pip install -r requirements.txt
-
Install the MineRL Library:
pip install git+https://github.com/minerllabs/minerl
-
Run the mineRL Python script:
python mineRL.py
-
Install Java Development Kit (JDK) 8:
brew tap AdoptOpenJDK/openjdk
brew install --cask adoptopenjdk8
-
Install Python dependencies:
pip install -r requirements.txt
-
Install the MineRL Library:
pip install git+https://github.com/minerllabs/minerl
-
Run the mineRL Python script:
python mineRL.py
The script will run a specified number of episodes in the MineRLObtainDiamondShovel-v0 environment using the CNN model.
During the execution, the script will display the actions taken and render the environment.
After the episodes, it will generate plots of the cumulative rewards, losses, and episode lengths.
Contributions to this project are welcome. To contribute, please follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes and test them.
- Submit a pull request.
This project is licensed under the MIT License.