---------SCROLL DOWN FOR HOW IT WORKS---------- Finally! I made a LEARNING ARTIFICIAL INTELLIGENCE! It is very slow at learning, and you will have to play 70+ games with it. But do not fear, it does work! NOTES: The AI smartness is not something you can change, it is the length of its learning memory, which means its smartness. ---------------------HOW IT WORKS:------------------------ For all you Scratcher curious about how I made an AI on scratch that learns, this is how I coded it. First, the AI scans and memorizes the position. This is used with lists, x meaning X, o meaning O, and - meaning not played. Second, the AI finds all the possible moves it can do, which are all the open spaces that have not been played on. Third, the AI scans the position again and stores it in its memory unit. The memory unit lasts for two turns and is used for advanced planning in the learning system. Fourth, the AI checks what it has learned already, and how it lost in the past. It deletes that move from its possible moves so it cannot make that same mistake again. Finally, the AI picks a move based on its analyses and hopes it didn't blunder. You're welcome. Also, click "See inside" to see a more thorough explanation of my code
Thank you for AI for existing! Thanks to the Romans for inventing Tic-Tac-Toe! Also thanks for viewing and please like and favorite! ---------------------CHANGELOG---------------------------- 6/27/2025: Phew! Been away for more than a year! Time for a new update! Huge upgrade, doubles AI learning speed. Additionally added two more backgrounds following current art style. Also planned to double learning speed again. 3/27/2024: Good update for people wanting to know how this works, added comments to every code section in the game (go check it out by pressing See Inside) 1/24/2024: HUGE UPDATE: Used griffpatch's encoding system (thanks @griffpatch) to make SAVE and LOAD buttons! Huge thanks to @gussybussysussy and @funni_person1 for asking me to make these. This update deserves a new update number: 3.0 1/26/2024: Added the update to the front page, replacing the ugly hashtags. 1/26/2024: Added an AI Smartness Level that shows on the front page. There are 26 different costumes. This is to make repeated playing less boring. Soon will double it to 52 costumes, one every five smartness. 1/17/2024: Fixed a bug where sometimes it doesn't detect a win. 1/16/2024: Added a better detection of you losing! (a lot more complicated than it sounds, took ≈2.5 hours) 1/16/2024: Added the detection of draws! Also fixed the changelog with the year 2024 instead of 2023. 1/14/2024: Fixed a terrible bug with the last update! (Just a little smarter syncing) 1/13/2024: Huge update! The AI learns twice as fast, so you don't have to play that many games with it. Also, it thinks four times faster. A very user-friendly game now :) 1/1/2024: Happy new year! 12/6/2023: Added to a studio 12/5/2023: First remix! 12/3/2023: Fixed another small bug where you can play on top of yourself. (easy fix) 12/3/2023: Fixed a small bug where the AI starts at 41 smartness. 12/3/2023: Three hearts and stars! (small achievements) 12/3/2023: Reached 15 views! (I know it's not a lot) 12/3/2023: Created a changelog. 12/3/2023: Created this project! IF YOU FOUND THIS COMMENT "supercomputer"