2. Programmer: How does the new AI work?

EAI Programmers description,

Main challenge 1

for the new AI is still the sheer multitude of possible choices that can be made.

The challenge is:

Main challenge 2

are the new hints and the support for the hints in the new match simulation.

In JPortal AI and the actual game are still two different stories. And I intend to keep it this way. This means "The Game" does not know whether a player is human or a computer player. From the Match (that is the name of the main game class) point of view both human and computer players are interfaced in exactly the same way. This also means I do not reuse any of the Match to implement the AI. The choices generated are not tested using the "Match" - all choices are tested internally by the AI. For that reason "within" the AI package the AI has its own independend implementation of a different Match. This one is called "VirtualMatch". This the real match is called "Match", the AI evaluation match is called "VirtualMatch".

Match Enforces all MTG rules. Cards are evalutaed by the scripting of the cards. Players are questioned when needed.

VirtualMatch Does not really enforce rules, but rather implements needed routines that can be used by AI. Cards are evaluated by using the hints found for cards (EnhancedHints).

EnhancedAI interfaces both the Match (indirectily) and VirtualMatch by EAIActions. Thus the challange is to implement VirtualMatch to enable it to evaluate all cards in a way that is as similar as possible to the actual real thing in "Match". I discovered that this is slow going. Once all is done it will be easy to keep it up to date. But I made knots in my brain to implement e.g. triggers of any kind in VirtualMatch. I have already come a good far way - but there is still much left todo.

Main challenge 3

are correctly implementing Hints for all supported cards → test cards

This is directly related to challange 2. All supported cards must have the correct EnhancedHints. 1/2 a year ago I said "finished" - but as testing continues, again and again I discover cards where not all hints are in place. This will require quite a lot of playing and focused attantion on details to discover cards where hints are not complete.