This project is a simple Markov Decision Process (MDP) game implemented using Python and Tkinter. The game allows the player to take actions that transition between states and receive rewards based on the current state.
- Transition between states based on actions.
- Receive rewards based on the current state.
- Reset the game to the initial state.
- Simple graphical user interface using Tkinter.
- Utility calculation using Bellman MDP utility function.
- Python 3.x
- Tkinter library (usually included with Python)
tabulate
library (install usingpip install tabulate
)
- Clone the repository:
git clone https://github.com/justAbhinav/MDP_Game_implementation
- Navigate to the project directory:
cd MDP_Game_implementation
- Run the MDP game script:
python MDP.py
- Run the utility calculation script:
python utility_calculation.py
- Click the "Start Game" button to begin.
- Use the "-1" and "+1" buttons to take actions and transition between states.
- The current state and reward will be displayed.
- The game ends when you reach the final state (-2 or 2), and a message box will show your final state and reward.
- Click the "Reset Game" button to restart the game.
The utility calculation for the MDP is performed using the Bellman MDP utility function. The utility matrix for T=0, T=1, T=2 is printed using the tabulate
library
This project is licensed under the MIT License.
- Tkinter for the graphical user interface.
- Python for the programming language.
tabulate
library for utility matrix printing.