dericmiller / threesai Goto Github PK
View Code? Open in Web Editor NEWBuilding neural nets in Python to play the puzzle game Threes
License: MIT License
Building neural nets in Python to play the puzzle game Threes
License: MIT License
ThreesAI is an implementation of the game Threes ( http://play.threesgame.com/ ) in Python 3 for training neural nets to play, and includes a pretrained net that performs better than random at Threes. There remains room for a significant improvement in the AI. ThreesAI requires Python 3, as well as keras, numpy, sys, tty, termios, and csv. The threesAI.py file contains the overall management code that handles both the game object (threesOOP) and either the AI object (AIOOP) or the input from a human player. To play a game of Threes on the command line using human inputs, run: python3 ./threesAI.py Use the arrow keys to make moves, and hit 'q' three times to quit the game early. To have the current AI model play 1000 games and report basic summary stats of its results, run: python3 ./threesAI.py ai The game records the scores of all of its games in the most recent run in the file gamesHistory.csv if you're interested in running more robust statistical analyisis of its performance. To train a new AI model, run: python3 ./threesAI.py ai new To add training games to the existing model, run: python3 ./threesAI.py ai train Lines 20 - 24 of AIOOP.py contain different ways to automate move generation. Only one of these lines should be uncommented; by changing which one, you can explore the performance of several nieve strategies at Threes and compare them to your Neural Net. Getting the Neural Net to perform better than random has proven extremely straightforward.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.