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

Problem in executing: "Montecarlo_control.py" #7

Closed ghost closed 5 years ago

ghost commented 5 years ago

Dear Massimiliano,

I am trying to execute your code "Montecarlo_control.py" from post number 2.

I have got the following issue: image

it seems thatif(checkup_matrix[row, col] == 0): receives a row index that is a float and not a int value. In this way it is not able to search index of the table.

Luca

mpatacchiola commented 5 years ago

Hi @lucanicolienel

I fixed the bug, it was necessary to cast to int the variables in line 157 and 158. You can download the updated file from the repository.

Cheers