Hi! I have an assignment with pygame in python. Our teacher has made most of the code and asks us to fill in what is needed to make the code work. The agent is supposed to move in a grid to the highest number available and then add the value off that number. When a number has been moved to, it is changed to 0, and when the agent is surrounded with zeroes (or ad the end of the grid) it stops.
This is the code which is given. We can only put code under “Add your code here:”, and arent allowed to change anything outside of it.
https://privatebin.io/?53dffbae04a27500#XkwvQeeNGAFK5sgzg6ZmvxaUmRmcq1fiuCM3BEeoTuV
When I try, the agent moves accordingly, but adds the value of the last number available before moving to it. Which lead it to stop before the last number in the grid has been visually moved to. Thankful for any help or tips!
submitted by /u/No_Drawer6182
[link] [comments]
r/learnpython Hi! I have an assignment with pygame in python. Our teacher has made most of the code and asks us to fill in what is needed to make the code work. The agent is supposed to move in a grid to the highest number available and then add the value off that number. When a number has been moved to, it is changed to 0, and when the agent is surrounded with zeroes (or ad the end of the grid) it stops. This is the code which is given. We can only put code under “Add your code here:”, and arent allowed to change anything outside of it. https://privatebin.io/?53dffbae04a27500#XkwvQeeNGAFK5sgzg6ZmvxaUmRmcq1fiuCM3BEeoTuV When I try, the agent moves accordingly, but adds the value of the last number available before moving to it. Which lead it to stop before the last number in the grid has been visually moved to. Thankful for any help or tips! submitted by /u/No_Drawer6182 [link] [comments]
Hi! I have an assignment with pygame in python. Our teacher has made most of the code and asks us to fill in what is needed to make the code work. The agent is supposed to move in a grid to the highest number available and then add the value off that number. When a number has been moved to, it is changed to 0, and when the agent is surrounded with zeroes (or ad the end of the grid) it stops.
This is the code which is given. We can only put code under “Add your code here:”, and arent allowed to change anything outside of it.
https://privatebin.io/?53dffbae04a27500#XkwvQeeNGAFK5sgzg6ZmvxaUmRmcq1fiuCM3BEeoTuV
When I try, the agent moves accordingly, but adds the value of the last number available before moving to it. Which lead it to stop before the last number in the grid has been visually moved to. Thankful for any help or tips!
submitted by /u/No_Drawer6182
[link] [comments]