I'm developing the mini-game Triple Triad seen in the game Final Fantasy VIII using Unity3D.
The basic game is a 3x3 grid, where the player and NPC hold 5 cards in their hand. The objective is to hold the most cards by the time the board is filled up. The cards hold 4 numbers on the top, bottom, left and right sides. A player places a card down on the grid and the other player can place one next to it, after which the numbers on the cards will be compared (e.g. if a card was in the middle and the opponent played one to the left of it, the right value of the opponent card would be compared with the left value of the card already there). If one card is greater than the other then the player will 'take' the opponents card.
More details about Triple Triad can be seen here: http://finalfantasy.wikia.com/wiki/Triple_Triad
I'm currently designing the AI for single-player usage so a human can play against an NPC. I have decided that the best way of developing the AI would be using a Minimax algorithm with alpha-beta pruning in order to work out the best possible move for the AI on their turn.
The problem I'm having is that the majority of examples I see on the internet show the evaluator function for tic-tac-toe. This is a lot simpler than the triple triad evaluator would be because the function would have to take into account the values on the card as well as the position it is being played in (e.g. taking an enemy card).
Does anyone have any tips on how I could code this evaluator function? Or at least how I could adapt the code from this site into one that would evaluate my board for triple triad?
http://www3.ntu.edu.sg/home/ehchua/programming/java/JavaGame_TicTacToe_AI.html