/2048-AI-enabled

The all so popular 2048 game now played by computer. The AI plays the game multiple times using completely random moves! The average end score per starting position is calculated.

Primary LanguageCSS

2048-AI-enabled

The all so popular 2048 game now played by computer. The AI plays the game multiple times using completely random moves! The average end score per starting position is calculated. The move with the highest score is chosen. By default the AI plays 100 games per move. Increase the run count for a stronger AI.

It's interesting to note that even though the AI is based on random moves, it plays quite well.

A typical AI game can reach 70000 points and last 3000 moves, yet the random-play runs from any given position yield an average of 340 extra points and only 40 extra moves before dying. (You can see this for yourself by running the AI and opening the debug console.)

CREDITS

Kuldeep Singh Sidhu

Github: github/singhsidhukuldeep https://github.com/singhsidhukuldeep

Website: Kuldeep Singh Sidhu (Website) http://kuldeepsinghsidhu.com

LinkedIn: Kuldeep Singh Sidhu (LinkedIn) https://www.linkedin.com/in/singhsidhukuldeep/