Machine Learning - MENACE
Game Introduction
100% pen Aka 'Tic-Tac-Toe' to all you Americans ⚡️ No costumes ❄️ Over 2,000,000 games played!!! ⚡️ Press 'S' to see player stats I'm planning on releasing a version of this that plays a more complex game (connect 4) soon, so please follow if you want to be notified when it comes out :) Update: I've just checked how many states connect 4 has, and it's far too many for this method. I'm going to attempt to make a neural network, but I'm not sure Scratch's limitations are high enough, so wish me luck! Top loved 17th, 18th, 19th, 20th, 21st, 22nd of December 2017 If you want to remix this, feel free! Just post a comment if you don't understand a part of it :) 5̶0̶0̶ | 1̶0̶0̶0̶ | 2̶0̶0̶0̶ | 5̶0̶0̶0̶ | 1̶0̶,0̶0̶0̶ | 2̶0̶,0̶0̶0̶ | 3̶0̶,0̶0̶0̶ | 4̶0̶,0̶0̶0̶ | 5̶0̶,0̶0̶0̶ | 7̶5̶,0̶0̶0̶ | 1̶0̶0̶,0̶0̶0̶ | 1̶5̶0̶,0̶0̶0̶ | 2̶0̶0̶,0̶0̶0̶ | 3̶0̶0̶,0̶0̶0̶ | 5̶0̶0̶,0̶0̶0̶ | 7̶5̶0̶,0̶0̶0̶ | 1̶,0̶0̶0̶,0̶0̶0̶ | 1̶,5̶0̶0̶,0̶0̶0̶ https://scratch.mit.edu/projects/184785220/ - image rendering without costumes A Scratch implementation of a basic form of machine learning. ⚡️ PRESS U to upload your training to the cloud ⚡️ PRESS T to train menace vs menace :) ⚡️ PRESS Q to play the very good, trained bot (only good when playing first though, so you may have to press 'f' to change so the bot plays first) ⚡️ PRESS I to play a dumb one ********************************************************************** Green flag - info G - MENACE vs player game P - player vs player game T - train MENACE vs MENACE S - see player stats F - change who goes first After playing a few games, please press 'U' to upload your data ********************************************************************** If you want to try playing against a untrained AI bot, then press 'I'. Please note you will not be able to upload data after doing that, unless you press 'D' to download the cloud stored dataset again. Meet MENACE - Machine Educable Noughts and Crosses Engine - a machine taught to play Noughts and Crosses. This is a Scratch version inspired by literal Match Box Machine in this video ( https://www.youtube.com/watch?v=R9c-_neaxeU ), which is based on the original 1961 “Experiments on the mechanization of game-learning” by Donald Michie. Each Tic-Tac-Toe game state is recorded (with rotations and reflections removed), and assigned a 'box'. Each boxes contains different colours/types of counters, which correspond to different moves (ie a 'red'/1 means bottom left. At the start MENACE just play a random valid move each turn, but it is gradually taught to play better. If MENACE wins, 3 more counters of the colour played are added to each box that a counter was picked from. If it loses, a counter is removed (unless there is only one left, in which case it is left). This is called reinforcement learning, and gradually MENACE should learn to play better. The main thing with this is that *at NO point is MENACE ever told the rules, or the aim of the game. It just plays randomly, and is rewarded for winning. Many thanks to @Zro716 for his base 10 to 3 encoder :) - https://scratch.mit.edu/projects/26187976 And to @theChAOTiC for his pen text engine - https://scratch.mit.edu/projects/90278685/ And @DadOfMrLog for his tri-fill. I've been using it for so long I don't know what project I originally got it from though ;) 26/11/2017 - Had to reset the boxes twice due to corruption - passed 6k games 27/11/2017 - reset again, added corruption checking (still can't find what the problem is though...) 28/11/2017 - Passed 28k games, AI has got pretty good now :) 9/12/2017 - Had to reset again, back to stupid :( 16/12/2017 - Curated :) 17/12/2017 - reduced clock lock time to 10s from 20s, as cloud seems to be fairly stable and this is getting quite a lot of traffic 20/12/2017 - updated to a new weighted-random choice method, as the old one was generating lists 200k+ items long on the first go! The new one is much faster now and removes a lot of the previous occasional slowing. Training is also much faster :)
How To Play
Author
TheGamer-
Category
Game Information
Game Popularity
21.8k views
Collection Count
663 favorites