Repository navigation
feat: AI tech maximization — aggressive tech push, layered defenses, apex unit weighting - #63
Merged
Merged
Conversation
…apex unit weighting All AI difficulties now race toward the tech ceiling rather than stalling at basic units. Key changes: - Rhizome ORGAN_PRIORITY gains 'tech' phase (power→refinery→production→tech→expansion) with TECH_CREDIT_MIN=1200 gate; getOrganPriority() returns 'tech' when production is established but no tech-category buildings exist and credits allow - DEFENSE_TARGET increased (easy:2 medium:5 hard:6 smart_hard:8); new AA_DEFENSE_TARGET (easy:0 medium:2 hard:3 smart_hard:4); new TECH_CREDIT_THRESHOLD per difficulty - buildDefenses(): 4-tier layered system (early perimeter → advanced → AA → outer padding); scales with phase (+1 mid, +2 late) so defenses grow with the game - followTechTree(): hard/smart_hard no longer gated on vehicle count for mid-tech; credit-driven tech rush via TECH_CREDIT_THRESHOLD; battle_lab easy threshold 12→6; superweapons unlocked for all difficulties; Rhizome 'tech' case builds mid-tech/battle_lab - buildUnitPool(): mid-tech phase adds extra mainTank slot, removes one basic infantry slot; late phase gives apocalypse_tank 3× weight, kirov/black_eagle/prism_tank 2×, removes both basic infantry slots to invest fully in apex units Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
'tech'betweenproductionandexpansionin Rhizome's metabolic loop. smart_hard AI now prioritizes tech advancement after production is established (credit-gated at 1200).buildDefenses()with 4 tiers (early perimeter → advanced turrets → AA guns → outer padding). Defense counts scale with game phase (+1 mid, +2 late). AA defenses (patriot_missile/flak_cannon) now actually get built.Files changed
src/combat/Rhizome.ts— ORGAN_PRIORITY + TECH_CREDIT_MIN + getOrganPriority() 'tech' branchsrc/combat/AI.ts— DEFENSE_TARGET/AA_DEFENSE_TARGET/TECH_CREDIT_THRESHOLD constants, buildDefenses(), followTechTree(), buildUnitPool()src/combat/Rhizome.test.ts— updated order test, mockEconomy(credits), 3 new tech-priority testsTest plan
npx tsc --noEmit— cleannpx vitest run— 98/98 tests pass (added 2 new tests, updated 1)🤖 Generated with Claude Code