How you ended up implement it in the code? Is it just a heuristic implemented as a series of if/else/case statements?
Minimax? Thank you
EDIT: sorry, I found out that source code is available, I will try to find it
EDIT2: Looks like it's up for sale, not open