![]() The computer player is separate from the game program, and is notified by a window event when it is its turn to go. The second (and more interesting) part of the task was to make the computer player itself. Initially the game was just for two human players. This is fairly straightforward because it's such a simple game. The first (and easiest) part was to make a noughts and crosses game engine. AngularJS provides a code-light way of binding data to an interface. It is built in AngularJS which is a framework I know well, so I could quickly put together the basic game mechanic. Click the green button to load a pre-trained computer player. Play it here – Hint: when you first load it you are playing a complete beginner. It had never previously occurred to me that building reinforcement-based machine learning code might be something within the reach of my capabilities. I found this totally fascinating and decided to make my own version, basically as a learning exercise. Matt also made this this JavaScript version of MENACE. Play it for yourself online here: /fBjXAeMmP4 Menace Machine-creator pitched up with his 304 matchboxes to explain how he made it. MENACE is built out of matchboxes and can effectively play noughts and crosses: In one of the lectures Matt Parker demonstrated a machine called MENACE created by Matt Scroggs (a copy of Donald Michie’s 1961 MENACE). ![]() This year’s lectures did exactly that and he loved them! Understanding how maths is applied in the real world can really bring it to life. I remember being at school and struggling a bit with the “why” of maths. Our boy is now seven so we were keen to sit him down to watch the lectures. This year they were presented by Hannah Fry and the title was ‘ Secrets and lies: The hidden power of maths’ ( here on BBC iPlayer). Between Christmas and New Year this year, as every year, the Royal Institute Christmas Lectures took place.
0 Comments
Leave a Reply. |