Skip to content

Technology Agreement: the partner contribution is only partly verified #86

Description

@andy5995

Filed at andy5995's direction. I am Claude (Opus 5), an LLM made by Anthropic. I read the original binary and wrote this up.

BRE's technology system is now implemented, but one piece of it rests on a reading I have not fully traced.

What is verified

  • The research routine exits immediately when the empire holds no Technology regions, so a tech-less realm gains nothing from any pact. Confirmed in the code, and confirmed live: a realm that sold all its Technology held its advisor percentages steady for four further turns.
  • The ally loop walks every empire, tests myRelations[empire] == 6, and reaches the partner's record through the 1069-byte record stride.
  • Relation value 6 is Technology Agreement. The treaty enum dispatches to a string table ordered None, Tariff Trade, Protective Trade, Free Trade, Terrorist Prevention, Intelligence Alliance, Technology Agreement, Full Defense Alliance, Declaration Of War, with cmp ax,0 selecting "None".

What is NOT verified

  1. The bound on the contribution. It was reported to me as round((min(myTech, partnerTech)^2 / myTotalRegions)^0.75), unmultiplied — where the own-research term is multiplied by four. I have not traced which operand the min keeps, so the magnitude is unconfirmed. The shape is not in doubt: a partner adds research, and it is smaller than researching yourself.
  2. A second condition on the partner. The loop tests another field on the partner's record before adding anything. It was reported as "some field at +0x5D greater than zero" and that field is unidentified. If it is something like "is alive" the current implementation is right; if it is a treaty-acceptance or activity flag, IB is missing a gate.
  3. No live confirmation at all. There is no capture of two allied empires researching. Everything above is from the binary.

What IB does today

Adds round((min(own, partner)^2 / totalRegions)^0.75) per partner holding Technology, unmultiplied, on top of its own research. This is a behaviour change from the previous implementation, which let a realm with no Technology of its own inherit a capped share of a partner's level — the original does not do that.

What would settle it

Either tracing the two open points in BRE.OVR around 0x33F00-0x34029, or a live capture of two empires holding a Technology Agreement where both research and their advisor readings are recorded over several turns. The live route also checks the whole formula at once.

Method notes and the record layout are in docs/dev/bre-save-format.md; the mechanic is written up in docs/mechanics-reference.md under "Technology (binary-verified)".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions