math - Partially re-create Risk-like game based on incomplete log files -


I'm trying to recreate this winning (risky) game:

< / P>

In other words, I want to know who was the owner of each area in each time, and how many soldiers were there in that area. My primary source of information is the game logs:

% This game is not in logs, but all the states start W / 3 soldiers.

% Since we know the owners of the field at the end of the game, and at any time of the game log time, field owners decide, change the mention of all owners.

% The challenge is to find out the number of soldiers on any area in a certain time.

% Game Lodge gives information about military deployment, reinforcement, and victory.

% However , the game log is incomplete assume that area X attacks area Y is unsuccessful, but in both areas lost soldiers in this process. The game log will not mention this

% It is not possible to find the number of accurate soldiers on the field at any time (normally), so I I am searching.

% I tried to make data with mathematica as a series of inequalities, but as the manual warns, the number of calculations increases rapidly with the number of inequalities. Even with a very small number of inequalities, it is hanging. Besides, I'm not sure that mathematica is the right tool here.

% Any ideas? Another example is:

% I know that but only tracks \ bosses, not the number of soldiers

You can use Prologue's barrier programming (specifically,). This will require you to notify all the rules in Prol, which can be a non-trivial task, however, Prologue can be enabled when you have all the possible valid (legal encoded rules case) ), Or simply show the categories of possible values.

In addition, while CLP / FD in Prolos is sometimes very fast, it can be difficult to solve your problem quickly, many of the most free solvers have quirks.

Again, I think this is a nontrivial task, even more if you are not programmed in Prolog before but I'm pretty sure this will answer you for answering.


Comments