Python Pong AI Tutorial - Using NEAT

Tech With Tim February 23, 2022
Video Thumbnail
Tech With Tim Logo

Tech With Tim

@techwithtim

About

I'm Tim, a self-taught developer & entrepreneur who brings you educational tech content without the fluff and noise. I went from a broke dropout working at McDonalds to making $100k+/month as a developer, travelling the world and moving to Dubai all before the age of 22. I've since helped thousands of aspiring developers land their first software engineering role and assisted mid-level devs land jobs at companies like google. Max landed his first developer job 3 weeks after going through my training. Youssef was laid off and landed a new role in 2 months while working with me. Jamario landing competing job offers before graduating college. If you want to learn more you can click the first link and watch my free training on how we help developers who already know how to code get hired by top tech companies.

Video Description

Welcome back to another video! At the beginning of this video you'll see an AI teaching itself how to play the game of Pong. It's doing it by using an algorithm called NEAT which stands for Neuro Evolution of Augmented Topologies. Now in this video I'm going to explain how this works and implement into this game! While it is focused on Pong, you can take what you learn and implement it into other projects, so I hope you enjoy and learn from this video! 💻Thanks To Apify for sponsoring this video! Get started using Apify today for FREE and get a 20% discount using the code: "TIM20"! https://www.apify.com?fpr=39sha 💻ProgrammingExpert is the best platform to learn how to code and become a software engineer as fast as possible! Check it out here: https://programmingexpert.io/tim and use code "tim" for a discount! 📄 Resources 📄 NEAT Documentation & Config File: https://neat-python.readthedocs.io/en/latest/xor_example.html NEAT Article: http://nn.cs.utexas.edu/downloads/papers/stanley.cec02.pdf Code In This Video: https://github.com/techwithtim/NEAT-Pong-Python Flappy Bird AI: https://www.youtube.com/vawatch?v=MMxFDaIOHsE Neural Networks For Beginners: https://www.youtube.com/watch?v=OS0Ddkle0o4 Pong In Python: https://www.youtube.com/watch?v=vVGTZlnnX3U&t=2s Fix Pip (Windows): https://www.youtube.com/watch?v=AdUZArA-kZw&t=204s Fix Pip (Mac): https://www .youtube.com/watch?v=E-WhAS6qzsU ⭐️ Timestamps ⭐️ 00:00:00 | Pong AI Demo 00:02:02 | Setup & Installation 00:05:32 | Pong Game Walkthrough 00:09:44 | Playing Pong 00:18:35 | NEAT Explanation 00:32:38 | NEAT Config File 00:36:54 | NEAT Setup 00:42:35 | NEAT Training Methodologies 01:05:24 | Training Our AI 01:09:03 | Testing Our AI ◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️ 👕 Merchandise: https://teespring.com/stores/tech-with-tim-merch-shop 📸 Instagram: https://www.instagram.com/tech_with_tim 📱 Twitter: https://twitter.com/TechWithTimm ⭐ Discord: https://discord.gg/twt 📝 LinkedIn: https://www.linkedin.com/in/tim-ruscica-82631b179/ 🌎 Website: https://techwithtim.net 📂 GitHub: https://github.com/techwithtim 🔊 Podcast: https://anchor.fm/tech-with-tim 🎬 My YouTube Gear: https://www.techwithtim.net/gear/ 💵 One-Time Donations: https://www.paypal.com/donate?hosted_button_id=CU9FV329ADNT8 💰 Patreon: https://www.patreon.com/techwithtim ◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️ ⭐️ Tags ⭐️ -Tech With Tim -Python Pong -AI Tutorial -Python AI Tutorial -NEAT -NEAT Explanation ⭐️ Hashtags ⭐️ #TechWithTim #Python #Pong

You May Also Like

Master AI Gaming Essentials

AI-recommended products based on this video

Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22
Loading...
SmallRig FX3 / FX30 HawkLock Quick Release Camera Cage Kit for Sony with XLR Handle Extension, Wrist Strap and Cable Clamp for HDMI, QR Cold Shoe, NATO Rail/QR Plate for Arca,Titanium Gray - 4771

SmallRig FX3 / FX30 HawkLock Quick Release Camera Cage Kit for Sony with XLR Handle Extension, Wrist Strap and Cable Clamp for HDMI, QR Cold Shoe, NATO Rail/QR Plate for Arca,Titanium Gray - 4771

(72)
$174.24$162.04
FREE delivery Thu, Jun 19
Loading...
6-Pack + 1 Base Magnetic and Adhesive Cable Organizer - 8mm Slot for Phone, USB, HDMI, and Power Cords. Cable Clips Suitable for use on Office desks, Home Tables, nightstands, and in Cars (White).

6-Pack + 1 Base Magnetic and Adhesive Cable Organizer - 8mm Slot for Phone, USB, HDMI, and Power Cords. Cable Clips Suitable for use on Office desks, Home Tables, nightstands, and in Cars (White).

(47)
$9.59
FREE delivery Mon, Sep 1 on your first order
200+ bought in past month
Loading...
HDMI Switch 4K 60Hz, WARRKY HDMI Switcher 2 in 1 Out [Aluminum Case, Fixed Braided Cable] Bidirectional HDMI Splitter 2x1 Support HDR, 3D, 4K, 1080P Compatible for PS5/4, Xbox, Roku, Fire Stick

HDMI Switch 4K 60Hz, WARRKY HDMI Switcher 2 in 1 Out [Aluminum Case, Fixed Braided Cable] Bidirectional HDMI Splitter 2x1 Support HDR, 3D, 4K, 1080P Compatible for PS5/4, Xbox, Roku, Fire Stick

(9,833)
$14.99
Prime
2K+ bought in past month
Loading...
Shcngqio 1080P Full HD Webcam with Privacy Cover, Wide Angle Lens, Active Light Correction, Plug and Play USB Webcam for PC, Desktop,Laptop (Black)

Shcngqio 1080P Full HD Webcam with Privacy Cover, Wide Angle Lens, Active Light Correction, Plug and Play USB Webcam for PC, Desktop,Laptop (Black)

(205)
$28.99
Prime
500+ bought in past month
Loading...
TRAUSI HD Webcam with Microphone, Noise Cancellation, Privacy Cover, Wide-Angle Lens, Auto Light Correction, Plug & Play USB Webcam for Laptop, Desktop, PC, Mac, Zoom, Skype, Streaming (1080P, Black)

TRAUSI HD Webcam with Microphone, Noise Cancellation, Privacy Cover, Wide-Angle Lens, Auto Light Correction, Plug & Play USB Webcam for Laptop, Desktop, PC, Mac, Zoom, Skype, Streaming (1080P, Black)

(284)
$27.99
Prime
1K+ bought in past month
Loading...
TRAUSI 1080P HD Webcam with Microphone, Noise Cancellation, Privacy Cover, Wide-Angle Lens, Auto Light Correction, Plug & Play USB Webcam for Laptop, Desktop, PC, Mac, Zoom, Skype, Streaming Black

TRAUSI 1080P HD Webcam with Microphone, Noise Cancellation, Privacy Cover, Wide-Angle Lens, Auto Light Correction, Plug & Play USB Webcam for Laptop, Desktop, PC, Mac, Zoom, Skype, Streaming Black

(205)
$28.99
FREE delivery Wed, Jul 2 on your first order
1K+ bought in past month
Loading...
HP 17.3" FHD Laptop, AMD Ryzen 5 5500U, 16GB RAM, 1TB SSD, AMD Radeon Graphics, Numeric Keyboard, 720p HD Webcam, WiFi, Windows 11 Pro, Silver, 32GB Hotface USB Card

HP 17.3" FHD Laptop, AMD Ryzen 5 5500U, 16GB RAM, 1TB SSD, AMD Radeon Graphics, Numeric Keyboard, 720p HD Webcam, WiFi, Windows 11 Pro, Silver, 32GB Hotface USB Card

(13)
$899.00
FREE delivery Wed, Jun 18
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
Asus ROG Swift 32” 4K OLED Gaming Monitor (PG32UCDP) - WOLED, Dual Mode (4K 240Hz, FHD 480Hz), 0.03ms, G-SYNC Compatible, Custom Heatsink, AI Gaming, 99% DCI-P3,True 10-bit, USB-C 90W, 3yr Warranty

Asus ROG Swift 32” 4K OLED Gaming Monitor (PG32UCDP) - WOLED, Dual Mode (4K 240Hz, FHD 480Hz), 0.03ms, G-SYNC Compatible, Custom Heatsink, AI Gaming, 99% DCI-P3,True 10-bit, USB-C 90W, 3yr Warranty

(192)
$1,399.99
FREE delivery Sat, Jan 3
50+ bought in past month
Loading...
Asus ROG Strix 27” 4K HDR USB-C Gaming Monitor (XG27UCG) – UHD (3840x2160) Dual Mode (4K 160Hz or FHD 320Hz), 1ms, Fast IPS, Extreme Low Motion Blur Sync, G-SYNC Compatible, AI Gaming, 3yr Warranty

Asus ROG Strix 27” 4K HDR USB-C Gaming Monitor (XG27UCG) – UHD (3840x2160) Dual Mode (4K 160Hz or FHD 320Hz), 1ms, Fast IPS, Extreme Low Motion Blur Sync, G-SYNC Compatible, AI Gaming, 3yr Warranty

(102)
$499.99
FREE delivery Jan 10 - Feb 21
Loading...
Reatan X7 AI Oculink Gaming Mini PC AMD Ryzen 7 255(Upgraded 8745HS) 32GB DDR5 1TB PCIe4.0 SSD 5600MHz RAM, Desktop Mini Computers Radeon 780M Graphics, 2.5G LAN/HDMI 2.1/2 * 8K USB 4.0/Wi-Fi 7/BT5.4

Reatan X7 AI Oculink Gaming Mini PC AMD Ryzen 7 255(Upgraded 8745HS) 32GB DDR5 1TB PCIe4.0 SSD 5600MHz RAM, Desktop Mini Computers Radeon 780M Graphics, 2.5G LAN/HDMI 2.1/2 * 8K USB 4.0/Wi-Fi 7/BT5.4

(38)
$749.00
FREE delivery Sat, Jan 3Only 3 left in stock.
Loading...
MSI Stealth A18 AI+ A3XWIG-013CA 18" UHD+ mini LED 120Hz Gaming Laptop, AMD Ryzen AI 9 HX 370, RTX 5080, 64GB DDR5, 2TB NVMe SSD, Windows 11 Home

MSI Stealth A18 AI+ A3XWIG-013CA 18" UHD+ mini LED 120Hz Gaming Laptop, AMD Ryzen AI 9 HX 370, RTX 5080, 64GB DDR5, 2TB NVMe SSD, Windows 11 Home

(1)
$4,499.00
FREE delivery Sat, Jan 3