Connect 4 AI (四目並べ)

Connect 4 AI (四目並べ)

by Spentine

👁 49,247 ❤️ 1,214 ⭐ 1,027 🔄 54
Created: Feb 10, 2023 Last modified: Feb 18, 2023 Shared: Feb 12, 2023

Description

How does it detect TurboWarp? In TurboWarp, there is an extension called TurboWarp blocks. You'll find it there. Why the AI is slow: https://www.youtube.com/watch?v=R-RQ3ph6lxM [CC] The project was originally created in English. If my translator messes up any translations please let me know. このプロジェクトはもともと英語で作成されました。もし、私の翻訳者が翻訳を台無しにしたら、私に知らせてください。 -- How the AI works (English) -- The AI works using the minimax algorithm and some openers from the strongest connect 4 AI. The opener component is simple. If the position is x, then move y. About 40K of these positions are stored. The minimax component is a bit more difficult to understand. It generates all the moves from the current position that it can make, and then for each of those moves it generates all the possible moves you could make, and so on. This allows it to see however many moves ahead into the future. The easy difficulty only searches 1 move into the future, the medium difficulty only searches 5 moves, and the difficult searches 6. Near the end of the game, there are less possible moves, so the depth may increase near the end. If you're playing on TurboWarp, you can use the Extreme difficulty to play with depth 7. -- AIの仕組み(日本語訳)-- AIはminimaxアルゴリズムと最強の四目並べ AIからいくつかのオープナーを使用して動作します。オープナーの構成は単純である。約40Kの位置が記憶されている。 ミニマックスコンポーネントは少し難解である。現在の位置から打てる手をすべて生成し、その手ごとに、打てる手をすべて生成し、といった具合です。これによって、何手先まで見通すことができるのかがわかる。簡単な難易度では1手先、中くらいの難易度では5手先、難しい難易度では6手先までしか探索しない。終盤になると、考えられる手が少なくなるので、終盤になると深さが増すことがあります。TurboWarpでプレイしている場合、Extremeの難易度を使用すると深度7でプレイすることができます。 #game #games #connect4 #connectfour #四目並べ so if this gets on trending it doesn't get put in the wrong spot (definitely didn't happen to my 2048 game)

Instructions

The instructions are in the project. 説明書はプロジェクトにあります。 [mobile friendly] The [difficult] AI is slow running on native Scratch. TurboWarp for speed https://turbowarp.org/802293688 If TurboWarp is blocked, use this link: https://spentine.github.io/random/Connect%204%20AI.html

Project Details

Visibility
Visible
Comments
Enabled