How to implement the Pentago AI algorithm

I am trying to develop Pentago-game in C #.

Right now I have a 2 player mode that works great.

the problem is that I need a single player mode (against the computer), but, unfortunately, all minimax / negamax tools are designed for one thing calculated for each "Move" (placing marble, moving the game-piece).

butin Pentago, each player needs to do two things (place the marble and rotate one of the inner boards)

I did not understand how to realize both the rotating part and the placement of marble, and I will love someone to guide me with this.

If you are not familiar with the game, here is a link to the game.

If anyone wants, I can download my code somewhere if it is relevant.

thank you very much in advance

+3
source share
2 answers

If one legal move consists of two sub-movements, then your "move" for the purposes of the game algorithm is just a tuple, where the first element is marble placement, and the second element is the rotation of the board, for example:

var marbleMove = new MarbleMove(fromRow, fromCol, toRow, toCol);
var boardRotation = new BoardRotation(subBoard, rotationDirection);
var move = new Tuple<MarblMove, BoardRotation>(marbleMove, boardRotation);

As a rule, the game algorithm requires that you list all the possible movements for a given position. In this case, you should list all possible pairs of approaches. Using this list, you can move on to the use of desktop computer games.

+1
source

, , , . , , , .

, UCT (, , ), , , , , . (Googling UCT . , : http://senseis.xmp.net/?UCT)

+1

Source: https://habr.com/ru/post/1782813/


All Articles