It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
http://www.polygon.com/2014/3/17/5519536/finding-treasures-in-the-code-why-the-source-code-of-classic-games

In this article they mention that inside the Source Code for this game (found in a distribution of JA2:Wildfire) they found a 300-word essay that describes how the developers went about programming the AI for the game. Interesting stuff!

While this text is found in the source code, could the contents of that text make it to the game on GOG.com as a bonus?
avatar
FlamingFirewire: While this text is found in the source code, could the contents of that text make it to the game on GOG.com as a bonus?
You can find the source code here. Going to see if I can find that essay in a file, but I don't recall seeing it in the 1.13 code. There are a lot of comments though, but I don't recall seeing a full explanation. Let me take a look though and see if I can find any.
avatar
FlamingFirewire: While this text is found in the source code, could the contents of that text make it to the game on GOG.com as a bonus?
Buggler in the Bear's Pit did find the relevant comments, it's in the beginning of Strategic\Strategic AI.c
Quoted below for your reading pleasure ;)
/*
STRATEGIC AI -- UNDERLYING PHILOSOPHY
The most fundamental part of the strategic AI which takes from reality and gives to gameplay is the manner
the queen attempts to take her towns back. Finances and owning mines are the most important way
to win the game. As the player takes more mines over, the queen will focus more on quality and defense. In
the beginning of the game, she will focus more on offense than mid-game or end-game.

REALITY
The queen owns the entire country, and the player starts the game with a small lump of cash, enough to hire
some mercenaries for about a week. In that week, the queen may not notice what is going on, and the player
would believably take over one of the towns before she could feasibly react. As soon as her military was
aware of the situation, she would likely proceed to send 300-400 troops to annihilate the opposition, and the
game would be over relatively quickly. If the player was a prodigy, and managed to hold the town against such
a major assault, he would probably lose in the long run being forced into a defensive position and running out
of money quickly while the queen could continue to pump out the troops. On the other hand, if the player
somehow managed to take over most of the mines, he would be able to casually walk over the queen eventually
just from the sheer income allowing him to purchase several of the best mercs. That would have the effect of
making the game impossibly difficult in the beginning of the game, and a joke at the end (this is very much
like Master Of Orion II on the more difficult settings )

GAMEPLAY
Because we want the game to be like a normal game and make it fun, we need to make the game easy in the
beginning and harder at the end. In order to accomplish this, I feel that pure income shouldn't be the factor
for the queen, because she would likely crucify a would-be leader in his early days. So, in the beginning of
the game, the forces would already be situated with the majority of forces being the administrators in the towns,
and army troops and elites in the more important sectors. Restricting the queen's offensive
abilities using a distance penalty would mean that the furthest sectors from the queen's palace would be
much easier to defend because she would only be allowed to send x number of troops. As you get closer to the
queen, she would be allowed to send larger forces to attack those towns in question. Also, to further
increase the games difficulty as the campaign progresses in the player's favor, we could also increase the
quality of the queen's troops based purely on the peek progress percentage. This is calculated using a formula
that determines how well the player is doing by combining loyalty of towns owned, income generated, etc. So,
in the beginning of the game, the quality is at the worst, but once you capture your first mines/towns, it
permanently increase the queen's quality rating, effectively bumping up the stakes. By the time you capture
four or five mines, the queen is going to focus more (but not completely) on quality defense as she prepares
for your final onslaught. This quality rating will augment the experience level, equipment rating, and/or
attribute ratings of the queen's troops. I would maintain a table of these enhancements based on the current
quality rating hooking into the difficulty all along.

//EXPLANATION OF THE WEIGHT SYSTEM:
The strategic AI has two types of groups: garrisons and patrol groups. Each of these groups contain
information of it's needs, mainly desired population. If the current population is greater than the
desired population, and the group will get a negative weight assigned to it, which means that it is willing
to give up troops to areas that need them more. On the other hand, if a group has less than the desired population,
then the weight will be positive, meaning they are requesting reinforcements.

The weight generated will range between -100 and +100. The calculated weight is modified by the priority
of the group. If the priority of the group is high, they
*/
avatar
FlamingFirewire: While this text is found in the source code, could the contents of that text make it to the game on GOG.com as a bonus?
avatar
JMich: Buggler in the Bear's Pit did find the relevant comments, it's in the beginning of Strategic\Strategic AI.c
Quoted below for your reading pleasure ;)

/*
STRATEGIC AI -- UNDERLYING PHILOSOPHY
The most fundamental part of the strategic AI which takes from reality and gives to gameplay is the manner
the queen attempts to take her towns back. Finances and owning mines are the most important way
to win the game. As the player takes more mines over, the queen will focus more on quality and defense. In
the beginning of the game, she will focus more on offense than mid-game or end-game.

REALITY
The queen owns the entire country, and the player starts the game with a small lump of cash, enough to hire
some mercenaries for about a week. In that week, the queen may not notice what is going on, and the player
would believably take over one of the towns before she could feasibly react. As soon as her military was
aware of the situation, she would likely proceed to send 300-400 troops to annihilate the opposition, and the
game would be over relatively quickly. If the player was a prodigy, and managed to hold the town against such
a major assault, he would probably lose in the long run being forced into a defensive position and running out
of money quickly while the queen could continue to pump out the troops. On the other hand, if the player
somehow managed to take over most of the mines, he would be able to casually walk over the queen eventually
just from the sheer income allowing him to purchase several of the best mercs. That would have the effect of
making the game impossibly difficult in the beginning of the game, and a joke at the end (this is very much
like Master Of Orion II on the more difficult settings )

GAMEPLAY
Because we want the game to be like a normal game and make it fun, we need to make the game easy in the
beginning and harder at the end. In order to accomplish this, I feel that pure income shouldn't be the factor
for the queen, because she would likely crucify a would-be leader in his early days. So, in the beginning of
the game, the forces would already be situated with the majority of forces being the administrators in the towns,
and army troops and elites in the more important sectors. Restricting the queen's offensive
abilities using a distance penalty would mean that the furthest sectors from the queen's palace would be
much easier to defend because she would only be allowed to send x number of troops. As you get closer to the
queen, she would be allowed to send larger forces to attack those towns in question. Also, to further
increase the games difficulty as the campaign progresses in the player's favor, we could also increase the
quality of the queen's troops based purely on the peek progress percentage. This is calculated using a formula
that determines how well the player is doing by combining loyalty of towns owned, income generated, etc. So,
in the beginning of the game, the quality is at the worst, but once you capture your first mines/towns, it
permanently increase the queen's quality rating, effectively bumping up the stakes. By the time you capture
four or five mines, the queen is going to focus more (but not completely) on quality defense as she prepares
for your final onslaught. This quality rating will augment the experience level, equipment rating, and/or
attribute ratings of the queen's troops. I would maintain a table of these enhancements based on the current
quality rating hooking into the difficulty all along.

//EXPLANATION OF THE WEIGHT SYSTEM:
The strategic AI has two types of groups: garrisons and patrol groups. Each of these groups contain
information of it's needs, mainly desired population. If the current population is greater than the
desired population, and the group will get a negative weight assigned to it, which means that it is willing
to give up troops to areas that need them more. On the other hand, if a group has less than the desired population,
then the weight will be positive, meaning they are requesting reinforcements.

The weight generated will range between -100 and +100. The calculated weight is modified by the priority
of the group. If the priority of the group is high, they
*/
avatar
JMich:
Really cool, thanks for looking that up!
Really nice idea from the developer, i guess that's why they initially disable the Drassen CounterAttack right? Still that's one of the best highlight of the game for me, 6 merc with standard equipment against literally hundreds of enemies and also couple dozens of black shirt, nothing more satisfying then seeing your merc surviving such onslaught.