AI

From BotF2-Wiki
Jump to: navigation, search

Intro

unfortunately there's still no AI built in BotF2 so at the moment BotF2 is primarily interesting for Multi Playing



Threads:



Answer of Matress to a question to AI:

We're hoping to get as much of the game done before we get an AI in the game, as soo many game components will eventually rely on the AI implementation. It's not just simply about combat or having someone to play against. The AI would need to make decisions on diplomacy, intel, research, ship movements/exploration/ship ranges, colonisation, system management (what to build, provide food, provide energy, defenses...), resource management (I need Dilithium to build...), reactions to random events, and so on.

That will take an incredible amount of coding, and since many of the game components that the AI will link into don't yet exist or are incomplete, there just isn't any point in building an AI yet. So i'm sorry to say, but it's going to be a while. But it will be done.

AI

2014-03-02 by Overlord http://star-trek-supremacy.proboards.com/thread/173/basic-ai:

I added some basic AI to the game. It would be nice if you could leave some feedback, I especially need info on when and what the AI should build at their colonies, what ships to build, fleet composition, when to colonize, etc.

Ship orders

  • GameEngine.cs has 1930 //UnitAI.DoTurn(civ); is commented out to reduce crashes out of AI ship movement.

Ship production

  • Empires build a colony ship every 20 turns until they have 6 colonies (including the homeworld)
  • Expanding Powers will build a colony ship every 30 turns until they have 3 colonies (including the homeworld)
  • Empires and Expanding powers will try to create the best station they can in their homesector
  • Empires will try to create a defense fleet at their homesector consisting of one command ship and 4 or 5 cruisers (or fastattack ships if no cruisers can be build)
  • Minors will try to build 2 or 3 fastattack ships
  • Developing and Expanding powers will try to build 2 or 3 cruisers (or fastattack ships if no cruisers can be build)


Diplomacy

  • AI will refuse agreements unless they have appropriate regard for you
  • You can increase regard by giving them credits or resources, currently 1 regard point for 100 credits (currently it stays for 10 turns, might change that in the future)
  • If you declare war regard will drop by 1000 points for 30 turns


Required Regard Levels:

    • Membership => Unified
    • FullAlliance => Allied
    • DefensiveAlliance => Allied
    • WarPact => Allied
    • Affiliation => Friend
    • NonAggression => Friend
    • OpenBorders => Friend
    • ResearchPact => Friend
    • TradePact => Neutral
    • CeaseFire => Neutral

Colony Management

  • AI will build food facilities if needed
  • AI will build industry facility for every 20 population


I added the ability to the AI to explore the map with its scout ships but because the algorithm used for that which was already there seems to be slow. Therefore I disabled it for now, but you can reenable it by running the game with the /aiexplore command line parameter. Turns might take long during the "Pre-Turn Operations" phase though.

List by reg: http://botf2.square7.ch/wiki-files/downloads/BuildWhatWhen.xlsx