Tutorial: Training a Neural Network to Play Tic-Tac-Toe with Reinforcement Learning in Jax
By
antognini
Front-window bakery material. Catches the eye, delivers the goods.
Summary
This article provides a tutorial on training a neural network to play Tic-Tac-Toe using reinforcement learning with Jax. The content is pedagogical in nature, focusing on teaching concepts rather than optimization, with code that can train a model to achieve perfect play in about 15 seconds on a laptop. The article includes practical resources like GitHub repositories and Colab notebooks for implementation.
Key quotes
· 3 pulledIn this article we'll learn how to train a neural network to play Tic-Tac-Toe using reinforcement learning in Jax.
This article will aim to be more pedagogical, so the code we'll end up with won't be super optimized, but it will be fast enough to train a model to perfect play in about 15 seconds on a laptop.
Code from this page can be found at this Github repo as well as in a Colab notebook (although the Colab notebook runs considerably more slowly).
You might also wanna read
Building a Deep Learning Library from Scratch with NumPy
This article introduces a project to build a simple deep learning library from scratch using only NumPy, starting with a blank file and prog
Building a Minimal RAG System from Scratch: PDF to Highlighted Answers in ~100 Lines of Python
A hands-on tutorial that builds the smallest functional RAG (Retrieval-Augmented Generation) system from scratch using about 100 lines of Py
Build Your Own LLM From Scratch: A Hands-On GPT Training Workshop
A hands-on workshop and GitHub repository that guides users through building their own GPT training pipeline from scratch, inspired by Andre
TRiP: An open-source Transformer AI engine built from scratch in C for educational purposes
TRiP (TRansformer in Progress) is an open-source, from-scratch implementation of a Transformer AI engine written entirely in C. Built over 1
Complete Educational Implementations of Ilya Sutskever's 30 Foundational Deep Learning Papers
This repository provides comprehensive educational implementations of the 30 foundational deep learning papers recommended by Ilya Sutskever
Andrej Karpathy's Course: Building Neural Networks from Scratch to GPT
Andrej Karpathy offers a course teaching how to build neural networks from scratch in code, starting with backpropagation basics and progres
