mpatacchiola / dissecting-reinforcement-learning

Python code, PDFs and resources for the series of posts on Reinforcement Learning which I published on my personal blog
https://mpatacchiola.github.io/blog/
MIT License
609 stars 175 forks source link

11X11 grid #13

Closed Andlibmehndi closed 5 years ago

Andlibmehndi commented 5 years ago

Hi @mpatacchiola i have 11X11 grid so how can i make transition_matrix can you please help me? Is there any generic code for creating transition_matrix by giving row and col of grid?

mpatacchiola commented 5 years ago

Hi @Andlibmehndi

Yes you can define your gridworld with a specific number of rows and columns:

from gridworld import GridWorld
env = GridWorld(tot_row=11, tot_col=11)

You can set the reward, transition, and state matrices using the methods of the class. Give a look to the code for more details about each method:

mpatacchiola commented 5 years ago

Closed for inactivity