Feature Implemented: AI Parallel Processing Upgrade ("Brain Boost")


Summary:

We've just rolled out a significant upgrade to our Go game's artificial intelligence (AI)! The goal was to make the AI think faster and smarter, especially when it's considering complex moves or when players choose higher difficulty settings.

What Was Done (In Simple Terms):

  • Giving the AI More "Brainpower": Previously, the AI used one part of your computer's processor (CPU) to think about its next move. Modern computers have multiple "cores" (like mini-brains) in their CPUs. This upgrade allows the AI to use several of these cores simultaneously.
  • How it Works - "Divide and Conquer":
    • When it's the AI's turn, it first looks at all the possible places it could put a stone (its potential first moves).
    • Instead of analyzing each of these possibilities one by one, it now sends different possibilities to different "helpers" (these are the Web Workers, running on different CPU cores).
    • Each helper focuses on deeply analyzing what might happen if the AI makes the specific move it was assigned. They run many simulations (like playing out mini-games in their head) for that particular starting move.
    • After a set amount of thinking time or a certain number of simulations, all the helpers report back to the main AI "manager".
    • The manager then looks at all the feedback from the helpers (which move led to the best outcomes in their simulations) and picks the overall best move to play.

Benefits for Players:

  • Faster AI Turns: By thinking in parallel, the AI can analyze more possibilities in the same amount of time, or complete its analysis quicker. This should lead to less waiting time for the AI to make its move, especially on higher difficulty settings.
  • Potentially Stronger AI: With the ability to process more information, the AI can make more informed decisions, potentially leading to stronger and more challenging gameplay.
  • Smoother Experience: The game should feel more responsive, as the main part of the game (the user interface) is less likely to freeze up while the AI is doing heavy thinking, because that thinking is now offloaded to these helpers.

Next Steps:

  • Further optimizations might be made to how the AI divides its thinking tasks among the helpers to ensure it's using your computer's resources as efficiently as possible.

We're excited about this upgrade and believe it will enhance the playing experience for everyone!

Files

go.zip Play in browser
12 hours ago

Leave a comment

Log in with itch.io to leave a comment.