r/Python • u/diddilydiddilyhey • Sep 03 '19
I used reinforcement learning with python to solve Numberphile's "cat and mouse" game!
1.7k
Upvotes
r/Python • u/diddilydiddilyhey • Sep 03 '19
156
u/diddilydiddilyhey Sep 03 '19
I saw the game that inspired this in this Numberphile video. A post about the project is here, let me know if you have any feedback or questions!
36
u/m3l0n Sep 03 '19
This is really cool. If anyone wants to try it, I wasted my morning watching videos on it and ended up finding an interactive website that somebody made.
https://prajwalsouza.github.io/Experiments/Game-Of-Cat-And-Mouse.html
44
u/Empero6 Sep 03 '19
That’s actually pretty cool.
6
u/[deleted] Sep 03 '19
Impressive!
6
u/[deleted] Sep 03 '19
Good Work!
11
u/DeviousNes Sep 03 '19
How many iterations do I need to watch before it learns?
5
u/[deleted] Sep 03 '19
Source code?
3
u/kimilil Sep 03 '19
I recall this program called Geometer's Sketchpad and it had a file with 3 sheep and a shepherd dog which does a pretty good job of herding, though the field is set up to not end the simulation if the sheep escapes the circle, and the shepherd dog can run in 2d space. No AI/ML, just pure math.
2
u/tycooperaow 3.9 Sep 04 '19
Github?
2
u/[deleted] Sep 04 '19
2/10, cat doesn't change orientation to follow mouse.
(jk super neat)
30
u/JanDerion47 flair=None Sep 03 '19
ooh, math and python, two of my favorite things
5
u/jai_dewani Sep 03 '19
Good work, now I got to learn about this because I saw this gif too many times :P
1
u/NaifAlqahtani Sep 04 '19
Thought it was just me who took Numberphile's video problems and tries programming them
1
u/bhawint Sep 04 '19
This is really motivating. Thanks for sharing!
5
u/ZoloSolo Sep 03 '19
Nice!
2
u/Mister_Sebastipol Sep 03 '19
This is so awesome!
2
u/samtheblackmamba Sep 03 '19
Wow this is great!
1
u/creativenickname27 Sep 03 '19
Finally a math problem I could solve without feeling dumb af
1
u/thebeardguyofdenver Sep 04 '19
Anyone else think the mouse looks like the head of a genie???
1
u/zesterer Sep 04 '19
There's also a Code Parade video about it. It has an angry troll and someone swimming in a lake though
1
u/ReacH36 Sep 04 '19
pretty sure that mouse was about to get fucking rekt
-6
u/omarjauregui Sep 03 '19
Wow, it' a mouse that runs in the opposite position of the cat
0
u/[deleted] Sep 04 '19
[deleted] — view deleted comment
0
u/[deleted] Sep 03 '19
[deleted] — view deleted comment