Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

AI Learns to Play and CONQUER 2048

Автор: Programmetry

Загружено: 2025-10-18

Просмотров: 100

Описание:

In this video, I teach an AI how to play and eventually win the classic 2048 game from scratch. We’ll build everything step by step in pure HTML, CSS, and JavaScript, and explore how the AI actually “thinks” about its next move.

This isn’t just a code-along; it’s a full walkthrough of how to design and code the AI algorithm, the decision-making logic behind many game AIs. You’ll see the full process, from setting up the board to teaching the AI to evaluate moves using heuristics like smoothness, empty tiles, and monotonicity.

If you’ve ever wondered how an AI decides what to do in a game, or how algorithms like Expectimax differ from Minimax, this is the perfect project to learn from — with real code, real results, and a few funny trial-and-error moments along the way.

We’ll cover everything step by step:
• Setting up the 2048 board and movement logic
• Creating helper functions to simulate tile slides and merges
• Designing heuristics for the AI to “measure” good moves
• Implementing the Expectimax algorithm for smarter play
• Watching the AI improve and finally win the game

By the end, you’ll understand how to code your own simple game AI, how Expectimax works, and how small changes in heuristics can dramatically affect performance.

Thanks for watching — and if you enjoy AI coding projects, programming tutorials, or just seeing what happens when code starts to think for itself, subscribe to Programmetry for more videos like this.

🎥 Subscribe for more videos like this:    / @programmetry  

🤖 AI Experiments Playlist:    • AI Experiments  

Timestamps:
00:00 Introduction
00:14 Phase 1: Coding 2048 From Scratch
00:49 Game Grid
01:03 Game Tiles
01:34 Movement and Score Tracking
02:23 New Game Button and High Score Tracking
03:17 Game Over Menu
03:36 Phase 2: Coding the AI (Max)
04:20 Max Plays with Random Moves
04:59 Adding Helpers
05:32 Creating Basic Heuristics
05:49 Smoothness
06:45 Expectimax Function
07:45 Max Plays with Expectimax AI Algorithm
09:12 Monotonicity
10:04 Max In Corner Strategy
10:58 Max Plays with New Heuristics
12:07 Merge Potential
13:03 Adjusting Heuristic Coefficients
15:05 Max Fumbles an Easy Win LOL
16:00 Max Finally Wins...?

Song: Fragments
Composer: AERØHEAD
Website:    / @aero_head  
License: Creative Commons (BY-NC 3.0) https://creativecommons.org/licenses/...
Music powered by BreakingCopyright: https://breakingcopyright.com

#ai #coding #programming #artificialintelligence #machinelearning #javascript #webdevelopment #codewithme #programmetry #codingproject #codingtutorial #creativecoding #beginnercoding #codingforbeginners #2048 #browsergame #codingai #machinelearningalgorithms #aialgorithms #gamedevelopment #gamedev #aiprogramming #code #aicode #aitutorial #aiforbeginners #machinelearningtutorial #codetutorial #algorithm #algorithms #aiagents #ailearning #neuralnetworks #reinforcementlearning

AI Learns to Play and CONQUER 2048

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Учебник по React для начинающих

Учебник по React для начинающих

How to make a Video Game - Godot Beginner Tutorial

How to make a Video Game - Godot Beginner Tutorial

4 Hours Chopin for Studying, Concentration & Relaxation

4 Hours Chopin for Studying, Concentration & Relaxation

Выживи 1000 Дней, Выиграй $100,000

Выживи 1000 Дней, Выиграй $100,000

Dzisiaj Informacje Telewizja Republika 23.12.2025 | TV Republika

Dzisiaj Informacje Telewizja Republika 23.12.2025 | TV Republika

NextJS 15 Full Course 2025 | Become a NextJS Pro in 1.5 Hours

NextJS 15 Full Course 2025 | Become a NextJS Pro in 1.5 Hours

Освещение в Unreal Engine 5 для начинающих

Освещение в Unreal Engine 5 для начинающих

Учебник по 2D-анимации в Blender для начинающих (учебник по рисованию карандашом)

Учебник по 2D-анимации в Blender для начинающих (учебник по рисованию карандашом)

Simulating Evolution with AI: Predators vs Prey

Simulating Evolution with AI: Predators vs Prey

Материалы Unreal Engine 6 уровней сложности

Материалы Unreal Engine 6 уровней сложности

Production-Grade AI Project Tutorial – Build & Deploy

Production-Grade AI Project Tutorial – Build & Deploy

Build an AI Agent From Scratch in Python - Tutorial for Beginners

Build an AI Agent From Scratch in Python - Tutorial for Beginners

Exploring AI with Scratch Face Sensing Blocks | Tutorial

Exploring AI with Scratch Face Sensing Blocks | Tutorial

3 Python AI Projects for Beginners - Full Tutorial

3 Python AI Projects for Beginners - Full Tutorial

Full Course (Lessons 1-10) AI Agents for Beginners

Full Course (Lessons 1-10) AI Agents for Beginners

Build and Deploy a Polished AI Project and Get Sales

Build and Deploy a Polished AI Project and Get Sales

Как работает ChatGPT: объясняем нейросети просто

Как работает ChatGPT: объясняем нейросети просто

Rymanowski, ks. prof. Naumowicz: Prawdy i mity Bożego Narodzenia

Rymanowski, ks. prof. Naumowicz: Prawdy i mity Bożego Narodzenia

I Tried Coding Lightning in 2 Minutes vs 2 Hours

I Tried Coding Lightning in 2 Minutes vs 2 Hours

AI Learns to GAMBLE

AI Learns to GAMBLE

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]