TravisBubb / DotsAndBoxesAI

Dots and Boxes Console Game with Simple AI Agent
1 stars 0 forks source link

Request for 5x5 boxs #1

Open Days-gone opened 2 years ago

Days-gone commented 2 years ago

hello , when it comes to 5x5 boxs , is there any way to make it fast enough to enjoy a game ?

TravisBubb commented 2 years ago

To be honest with you, I am not sure if there is with this current implementation. I don't know how familiar you are with the minimax algorithm but it is not very efficient when it comes to bigger states. There are simply too many paths to search through to be efficient, even with the added boost of alpha-beta pruning.

To put it simply, the fact that Python is being used and the nature of the algorithm - no. However, there certainly could be a much more efficient solution in a different AI implementation. Perhaps a more modern approach such as training a machine learning model.

Another thing that could help is studying various strategies that are good for earlier in the game. The earliest moves take the longest since there are more open spots. If you were to make a separate model with early game strategies that the agent could simply reference as needed (and not need to do any additional computations) then the AI would become a little more efficient, and also better at the game too.

Days-gone commented 2 years ago

Sincerely thank you for your helpful reply, I am trying imply Monte Carlo method  to the early game ,and may try minmax algorithm in the endgame.​

------------------ 原始邮件 ------------------ 发件人: "TravisBubb/DotsAndBoxesAI" @.>; 发送时间: 2022年7月21日(星期四) 上午7:08 @.>; @.**@.>; 主题: Re: [TravisBubb/DotsAndBoxesAI] Request for 5x5 boxs (Issue #1)

To be honest with you, I am not sure if there is with this current implementation. I don't know how familiar you are with the minimax algorithm but it is not very efficient when it comes to bigger states. There are simply too many paths to search through to be efficient, even with the added boost of alpha-beta pruning.

To put it simply, the fact that Python is being used and the nature of the algorithm - no. However, there certainly could be a much more efficient solution in a different AI implementation. Perhaps a more modern approach such as training a machine learning model.

Another thing that could help is studying various strategies that are good for earlier in the game. The earliest moves take the longest since there are more open spots. If you were to make a separate model with early game strategies that the agent could simply reference as needed (and not need to do any additional computations) then the AI would become a little more efficient, and also better at the game too.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

TravisBubb commented 2 years ago

Good luck!