Tic-Tac-Toe AI: How to Make the Tree?

前端 未结 5 1406
Happy的楠姐
Happy的楠姐 2021-02-01 08:11

I\'m having a huge block trying to understand \"trees\" while making a Tic-Tac-Toe bot. I understand the concept, but I can\'t figure out to implement them.

Can someone

5条回答
  •  情书的邮戳
    2021-02-01 09:09

    You might find this codeproject article interesting :

    Solve Tic Tac Toe with the MiniMax algorithm

    It's in C#, but it won't be any problem to adapt it in C++.

    This article was also a good read for me when I tried to implement my first Tic-Tac-Toe game in C++ :

    Minimax Explained

提交回复
热议问题