From Scratch: AI Balancing Act in 50 Lines of Python
towardsdatascience.com
towardsdatascience.com
It's nice to see someone actually going for the MVP.
Fun fact: a policy of [1,2,3,4] will solve the game.
When I started off the article, I was thinking of doing some kind of evolutionary-based policy search but turns out none of that is even necessary.
I hope to have a more technical follow up w/ deeper analysis and hopefully another one that goes into harder games where random guessing is okay, but there are more "sample efficient" methods.
Seeing that it can be reasonably done by a random walk and the fact that it's only 4 dimensions kind of makes me want to do a uniform convering of the space and visualize the results.
I even made a tutorial series. https://www.youtube.com/watch?v=pClGmU1JEsM&list=PLTWFMbPFsv...
Apologies for the shameless plug.
Seems to be more of an issue of knowing calculus and control system patterns.
> In the game of pong, it might be the vertical position of each paddle and the x, y coordinate of the ball.
The velocity vector of the ball is also a (very important!) part of the state.
(Admittedly I've never built anything to play pong )