AI learns to play 2048

I created an AI to play the game 2048, his name is Thomas
Huge thanks to for supporting this channel check them out at
I have twitter now. Yay
follow me to fill the void in my heart
Become a patreon to support my future content as well as sneak peaks of whats to come.
Check out my Discord server
I know heaps of people are going to ask so here is the music
Mirror Mirror - Diamond Ortiz
Smiles for miles - Silent Partner
Hyperspeed - eveningland
Gypsy Dance - Topher Mohr and Alex Elena
Etherial Chior Ascends - Doug Maxwell
Wishful thinking - Dan Labowitz


  1. Su abc

    Su abc2 dager siden

    Make AI learns how to play geometry dash


    MCROCKET ENGINEER2 dager siden

    Enigma pt.2!!!

  3. Thomas Thornton

    Thomas Thornton2 dager siden

    my name is thomas and <a href="#" class="seekto" data-time="471">7:51</a> it made me laugh

  4. Andy Stanton

    Andy Stanton3 dager siden

    It looks like I'm a genwunner when it comes to this game, except I press the buttons with this priority order: Down, Right, Up, Left.

  5. reinier bato

    reinier bato4 dager siden

    AI playing poker

  6. weakamna

    weakamna4 dager siden

    have you checked out HyperNEAT? it would be a better fit for this game, as it is (apparently) much better at geometrically "connected" games, where you have relationships between positions

  7. Chase Jackson

    Chase Jackson4 dager siden


  8. Jeremy Do

    Jeremy Do4 dager siden

    my grandma can get 16384 XD

  9. A 5p Bag

    A 5p Bag5 dager siden

    Thomas sucks

  10. Emr1982

    Emr19825 dager siden

    Do a AI making a AI

  11. Sophie Udeh-Philip

    Sophie Udeh-Philip6 dager siden

    THOMAS YOU DUMB MOTHER- rip thomas

  12. Xylophone Republic

    Xylophone Republic6 dager siden

    When a robot is better at 2048 than you.

  13. Tom George

    Tom George7 dager siden

    Which programming language is this??? Looks like the Arduino IDE in Night mode to me. XD

  14. Omnipotent

    Omnipotent7 dager siden

    <a href="#" class="seekto" data-time="499">8:19</a> music makes it feels like It's the beginning of the end.

  15. Wasted Time

    Wasted Time7 dager siden

    Has anyone made it to 4096 block? I had both 2048’s but they weren’t together and i couldn’t get them together.

  16. HensterPlayz -My new channel!

    HensterPlayz -My new channel!7 dager siden


  17. Scorps82

    Scorps827 dager siden

    <a href="#" class="seekto" data-time="159">2:39</a> Puberty Has Left The Chat.

  18. Maycee Salvador

    Maycee Salvador8 dager siden

    Next Video: Monkey learns to solve a Rubik’s Cube

  19. Oliver Clifford

    Oliver Clifford8 dager siden

    Do you know we can still unsubscribe you arshole

  20. YTBeeSwarmGamer

    YTBeeSwarmGamer8 dager siden

    Me after seeing this: What the Hell has he made now?!

  21. ne

    ne8 dager siden

    Is IT possible that a Programme programming himself?

  22. ananas killer

    ananas killer9 dager siden

    I never play 2048

  23. no-o_b__dUdE

    no-o_b__dUdE9 dager siden

    Turn it to be 0.25x If u want to know the trick :D


    1k WITH ZERO VIDEOS CHALLENGE9 dager siden

    Just realized I am the 6,458,460th person that has seen this. I dont know why I am watching this but it is 3am where I live so I think it is my 3am mind telling me to watch this

  25. Crystal The Crystal Uni

    Crystal The Crystal Uni9 dager siden


  26. Luke E

    Luke E9 dager siden

    I made 2048 for my 4U computing class because of your videos!

  27. Aiden Henderson

    Aiden Henderson10 dager siden

    U fucking steven universe fan -aiden 2020

  28. L Wheeler

    L Wheeler11 dager siden

    Enigma pt. 2

  29. Flak0

    Flak011 dager siden

    AI learns to activate Skynet

  30. Adric Wickenhagen

    Adric Wickenhagen11 dager siden

    AI leaves to make games and make AI so code bullet don’t have to do any thing

  31. universal ace

    universal ace12 dager siden

    " steven (a 2) connie (a 2)" quick fusion dance <a href="#" class="seekto" data-time="80">1:20</a>

  32. Hamza Ahmad

    Hamza Ahmad12 dager siden


  33. Hamza Ahmad

    Hamza Ahmad12 dager siden

    <a href="#" class="seekto" data-time="671">11:11</a> nice

  34. Luke Mars

    Luke Mars13 dager siden

    Big brain lol

  35. OgaDuby

    OgaDuby13 dager siden

    anyone watching in 2048? greetings from 2020!

  36. MrCumberlander1

    MrCumberlander113 dager siden

    A better way to score is probably to assign points based on the relative values of tiles beside each other. Like a tile with a tile of the previous or higher teir beside it gets a score of 2, a tile with an identical tile beside it gets 1, and tiles with a teir diference of more than one get zero. You can measure by checking down a list of tiles sorted by size.

  37. Check Norres

    Check Norres14 dager siden

    BTW, you forgot to teach it how to abuse the undo button to cheese the RNG :)

  38. Check Norres

    Check Norres14 dager siden

    AI must technically have an algorithm or at the very least consist of one. It's also not wrong to say that an AI is an algorithm. It's also not wrong to say that a machine learning algorithm is a kind of AI. I think you did all the right things

  39. Robot Studios89

    Robot Studios8914 dager siden

    <a href="#" class="seekto" data-time="567">9:27</a>: tommy dies for the last time

  40. Robot Studios89

    Robot Studios8914 dager siden

    <a href="#" class="seekto" data-time="552">9:12</a>. Tommy succeeds!!!!!!!!!!

  41. Robot Studios89

    Robot Studios8914 dager siden

    <a href="#" class="seekto" data-time="471">7:51</a>: and again

  42. Robot Studios89

    Robot Studios8914 dager siden

    <a href="#" class="seekto" data-time="410">6:50</a> also happens

  43. Robot Studios89

    Robot Studios8914 dager siden

    <a href="#" class="seekto" data-time="487">8:07</a>. It happens again.

  44. Robot Studios89

    Robot Studios8914 dager siden

    <a href="#" class="seekto" data-time="436">7:16</a>. AI sucks

  45. Ogi Shugi

    Ogi Shugi14 dager siden

    i did in this game 343572 points good luck to the man who try to bit me

  46. Reapermaster 123

    Reapermaster 12314 dager siden


  47. Magnus Chain

    Magnus Chain15 dager siden

    Dad: what did you learn today? Me: baby steps are bad, so you should give the baby steroids. Dad: oh so that's where I want wrong with you! Me: wut

  48. Unhumanized

    Unhumanized16 dager siden

    He did it I'm so happy for those strings of code

  49. ꧁ ṃąяṡ ꧂

    ꧁ ṃąяṡ ꧂16 dager siden

    AI learns tetris x

  50. Adam Cavill

    Adam Cavill17 dager siden

    2048 is freakin’ easy

  51. Bent Rod

    Bent Rod18 dager siden

    I think tommy’s issue had to do with the randomness of the tile spawning. He always predicts for a 4 in the perfect spot as that would have the highest game value and moves accordingly.

  52. Ksatya Sirisha

    Ksatya Sirisha19 dager siden


  53. ihasarax

    ihasarax19 dager siden

    Do i understand: no Am i entertained: yes

  54. Leif Abrahamson

    Leif Abrahamson20 dager siden


  55. Bighaytchy

    Bighaytchy21 dag siden

  56. Julien

    Julien22 dager siden

    i know its al little late but what happens if you just dont allow him to move in all 4 directions but only 3 of them that always worked for me when i played the game

  57. Anelis Reyes

    Anelis Reyes23 dager siden


  58. JustGoogleIt

    JustGoogleIt25 dager siden

    i was at like 300,000 some thousand before i fell asleep playing and mashed my screen ruining my game. uninstalled app and forgot it ever existed till now.

  59. Callum

    Callum28 dager siden

    I did this a few years ago too. I found that minimax/expectimax (especially the latter) was too computationally intensive considering the simplicity of the problem. By far the best algorithm I used was in my first attempt. For each possible move (up/down/left/right) from the current game state, it just randomly pressed buttons in different directions after that. For each original move from the current game state, a certain number of games were played and the average score of these games were calculated. Then depending which direction offered the best average score, it'd move in that direction. This took care of bad moves which caused early deaths, good moves which kept similar tiles close together (as this would eventually pay off in the long run, which this algorithm was able to consider as it played each game until game over rather than just X moves ahead). It was extremely fast, could be parallelised and won easily over 90% of games played. It could play a game to winning in a few seconds without any parallelism (after implementing the algorithm itself in C anyway, then invoking that from python).

  60. Не будь бараном

    Не будь бараном28 dager siden

    Are you just using Q-learning, you the 'game-state guy'? 😂

  61. Ring 2

    Ring 229 dager siden

    Does anyone else hear gibberish when he talks smart?

  62. Ryan Coates

    Ryan CoatesMåned siden

    What coding software do you use?

  63. ThatWoodCD

    ThatWoodCD20 dager siden

    Ryan Coates he uses JavaScript

  64. Gaming klawx1000 Dreadklaw

    Gaming klawx1000 DreadklawMåned siden

    Assign a musical note fire the higher lower values

  65. Shivam Pawar

    Shivam PawarMåned siden

    On what software do you code these games on?

  66. ThatWoodCD

    ThatWoodCD20 dager siden

    Shivam Pawar he uses JavaScript

  67. CharTee _

    CharTee _Måned siden

    I was just swiping up-left-down-right or in a different direction sometimes like in a washing machine and so far I got to 8192 xD

  68. R G

    R GMåned siden

    When you’re in 2020 and realize humanity won’t last to 2048

  69. JuggernautStyle

    JuggernautStyleMåned siden

    Imma be honest: Code Bullet is 40% actual coding/results, and 60% watching how the AI fucks up.

  70. Zmey101

    Zmey101Måned siden

    In which application do you code the programs Please tell us

  71. Zmey101

    Zmey10110 dager siden

    @ThatWoodCD Thank you for your answer. But i was talking about the application he codes in.

  72. ThatWoodCD

    ThatWoodCD20 dager siden

    Zmey101 he uses JavaScript

  73. droplock gamer

    droplock gamerMåned siden

    AI Leans to play an online 3d game

  74. Dragon-X-I

    Dragon-X-IMåned siden

    Every time he says “2048” I panic because I think he’s talking about the date and have short panic attack because I think I traveled to little in time

  75. jayesh patel

    jayesh patelMåned siden

    I don't know how you do it, but it's awesome and make me wanna learn this

  76. Storm Striker

    Storm StrikerMåned siden

    It’s not 2048 it’s 2048 you idiot!

  77. Navoii Gamer

    Navoii GamerMåned siden

    DIGI FUUSE Only digimon fans understand

  78. Alice Curious

    Alice CuriousMåned siden

    The first time i play 2048 i win

  79. Avram Fox

    Avram FoxMåned siden

    2048 is easy

  80. XPERTZ- Goku

    XPERTZ- GokuMåned siden

    AI Learns to play Fortnite

  81. STH Silqueira

    STH SilqueiraMåned siden

    The beep is so loud

  82. The Squeak

    The SqueakMåned siden

    hey, liked this video. what IDE are you using?

  83. Бекзат Соодаев

    Бекзат СоодаевMåned siden

    can anyone share the source code for the game that he wrote in Processing?

  84. Jimmy Steel

    Jimmy SteelMåned siden

    i thought ai was supposed to be better than human minds at certain activities well i got the 16384 tile