Poll

What do you think of this procedure as described?

This procedure appears to contain a bug and requires a change.
1 (50%)
This procedure operates in an acceptable manner, but this procedure appears to possess oversight(s) that require change.
0 (0%)
This procedure should not receive any change.
0 (0%)
A coherent opinion of this procedure eludes the present individual.
1 (50%)
This individual has another opinion or option that he or she plans to suggest that rectifies this situation potentially.
0 (0%)

Total Members Voted: 2

Author Topic: What do you, the other players, think? (Poll)  (Read 2012 times)

0 Members and 2 Guests are viewing this topic.

Offline Dio

What do you, the other players, think? (Poll)
« on: December 21, 2015, 09:18:03 PM »
     I found a buried feature that appears complete except that the game negates the value it offers when it determines whether or not the AI provides a treaty with another faction. I can provide the complete set-up for the affected area. The feature it jumps over negates any influence from a few features that depend upon the number of bases that the faction which refuses or accepts the treaty offer (often a human player). The formula appears as follows: [(Faction that refuses or accepts treaty request (e.g. Human Player) might value (range: 1-99,999) + 1) * (4 - Fight Interest of Faction that requests treaty [e.g. AI]) * 2 / Faction Might Value of treaty proposer (e.g. AI) + 1]. If either faction that remains involved in this proposal are the Gaians, than add two towards the quotinent.
     If the factions have a truce active, than jump over the next step. Add 3 - Fight interest of Treaty proposer towards the quotinent from the first expression. If the faction that either accepts or refuses the treaty controls zero bases, than skip the three sentences that follow this sentence.  If the commerce rate of the treaty proposer remains lower than the commerce rate of the faction that refuses or accepts the treaty, than skip the two sentence that follow this sentence. If none the above conditions activate, than take the sum of energy surplus from all bases of the faction that refuses or accepts the treaty (Add +1 per base if the faction has the INTEREST, 0 Faction Bonus); divide it by the number of bases from this faction and add the whole number quotinent towards the value from either the first or second expression. If the commerce rate of the faction that proposes the treaty is above the commerce rate of the faction that accepts or rejects the treaty, than add + 1 towards the previous expression.
If a condition is not zero, than skip over the next four sentences. If the human player has a might rating equal to or below Sufficient, than jump over the next sentence. If the above condition is not met, than check if the AI Player has a might above Sufficient. If the factions meet either of the above conditions, add +1 towards this value. If the value in another memory address is zero, add +1 towards this value.
    This last section illustrates the coverup and question that this thread involves. The game then checks if the factions have a truce and replaces the value from the above procedures with either a 1 or 0. If the factions have a truce or are the Gaians, than the value always remains 1. If the factions do not have a truce, than the value is zero.
     This leads me to ask this question. What do you make of this sequence? What change might you suggest? I think the best course involves changing this procedure so it only employs the zero or 1 values while the game checks whether or not the factions have a truce.
« Last Edit: December 22, 2015, 01:49:22 AM by Dio »

Offline Mart

Re: What do you, the other players, think? (Poll)
« Reply #1 on: December 21, 2015, 09:27:58 PM »
Is this feature inactive?
Does this feature include 3 factions? or only 2? As I understand, it helps to sign Treaty?

Offline Dio

Re: What do you, the other players, think? (Poll)
« Reply #2 on: December 21, 2015, 09:31:22 PM »
This procedure only involves two factions: the faction that proposes the treaty (AI) and the faction that rejects or accepts the treaty proposal (Human).

Offline Dio

Re: What do you, the other players, think? (Poll)
« Reply #3 on: December 21, 2015, 09:35:50 PM »
Is this feature inactive?
Does this feature include 3 factions? or only 2? As I understand, it helps to sign Treaty?
This procedure partly determines the value that goes into a check that determines whether or not the scripts (Alientreaty, Factiontreaty, or Offertreaty scripts) for a treaty request appear. The section in question appears as the 0 or 1 overides the value that appears in the first three quarters of that paragraph.

Offline Mart

Re: What do you, the other players, think? (Poll)
« Reply #4 on: December 21, 2015, 10:19:22 PM »
is the value float type? or integer?

Offline Dio

Re: What do you, the other players, think? (Poll)
« Reply #5 on: December 22, 2015, 01:48:07 AM »
The first portion appears to operate as a floating value. The second portion simpy employs integer values. The floating point value originates from the values in the first section of that calculation.

Offline Dio

Re: What do you, the other players, think? (Poll)
« Reply #6 on: December 22, 2015, 02:05:03 AM »
The last section of this procedure before it enters the actual section for the script adds the result from the subtraction of the AI Faction Commerce Rate from the Human Commerce Rate. If the value falls below 0 or exceeds 100, than add 0 or 100 respectively. Otherwise, add the result to either 0 or 1. This value then sets a value in another register if it does not equal 0. The last section appears as 0 + Argument 2 (0 or 1 + difference between commerce rates) + 5. It compares this value against a faction's reputation values (0-99) + the number of bases that they continue to assimilate from the other faction (I think is the human reputation value + bases). The game jumps over the treaty scripts if the first expression is equal to or greater than the second expression. The last section checks if a faction has the I want revenge diplomatic status set. If they do not, than jump into the treaty script.

Offline Mart

Re: What do you, the other players, think? (Poll)
« Reply #7 on: December 22, 2015, 12:33:05 PM »
Looks like 0 and 100 operates as percentages, but values between 0 and 1 can do exactly the same intention. It all looks as quite complicated logic, I will have read that more and try to figure out what that actually means.
What would help, is realization what possible values it can take, but also, if it exceed some range, what range it is.

Integer values can be added/multiplied by, etc. with float and compiler would make implicit cast. How does it look in assembly, I do not know. If we deal with values between 0 and 1, and they represent percentages, then this may be the case. Also float would be necessary in this case.

What are your plans here? You said that part of the formula is inactive. Would you like to enable it?

Offline Nexii

Re: What do you, the other players, think? (Poll)
« Reply #8 on: December 28, 2015, 06:59:26 AM »
This is a bit hard to understand.  A flowchart of the AI decision tree might be easier for me to comment on.  Suffice to say the way the AI decides to war/treaty/truce is really erratic in game.

Offline Dio

Re: What do you, the other players, think? (Poll)
« Reply #9 on: December 28, 2015, 11:39:12 PM »
The hard portion about this whole procedure remains that it covers many different scripts. I mapped out a simplified decision tree as follows:
1. Check if the faction wants to "SwearaPact" script.
2. If the factions have a vendetta, than check for "RansomTreaty Script"
3. If not the ransomtreaty script, than check for various types of truce scripts (Energytruce, techtruce, and offertruce/Factiontruce).
4. Then check if the faction wants to surrender (TrucePlease).
5. If the faction does not meet the conditions of surrender or "More War", than enter into the section for the Faction treaty scripts.

 

* User

Welcome, Guest. Please login or register.

Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

Remember, genes are NOT blueprints. This means you can't, for example, insert the genes for an elephant's trunk into a giraffe and get a giraffe with a trunk. There are no genes for trunks. What you CAN do with genes is chemistry, since DNA codes for chemicals. For instance, we can in theory splice the native plants' talent for nitrogen fixation into a terran plant.
~Academician Prokhor Zakharov 'Nonlinear Genetics'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 41.

[Show Queries]