Jump to content

Surrender Terms For The Ai


Recommended Posts

Not sure if this is the best place, but do move if you want to.

It would really make sense for me to give the AI some surrender terms, conditions which if met cause the AI to just kill off the remainder of its forces. If we don't do this, when the AI's CCs and buildings are all destroyed unless all troops are gone beforehand it will start placing a new CC at the top corner of the map (or even off the map on occasion).

So... what should the terms be where the AI goes all hari-kiri? Losing all CCs would be one option but might make it too easy to win by going all out for the CC and ignoring other buildings. We could alternatively give it a set of buildings with a "NeedToKill" class added. Or maybe include troops in some way, since it would equally suck for the AI if you killed all its critical structures but it still had an army mashing your base to pieces at the time and a load of guys on standby to rebuild.

So, thoughts?

P.S. This is NOT for Alpha 5, to clarify, just planning for future versions.

Link to comment
Share on other sites

Moved to the Development & Technical Discussion forum.

And entities already have a WinCritical or something like that on them to indicate what needs to be destroyed in order for you to win.

I think, rather than make the AI try to resign, have it try to sensibly rebuild in a new place, i.e. it retries to rebuild elsewhere

Link to comment
Share on other sites

In the future we will have different game modes (different victory conditions), currently we have only "conquest", which meant that player will be defeated in case if all it's important buildings/units will be destroyed/killed (see http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/EndGameManager.js), to mark important buildings/units we have "ConquestCritical" class for Identity component, currently it is added to all units and all buildings. Probably bot should act like human-player in this case, i.e. if human-player is able to proceed game, bot should be able too, if human-player is not able to play later (have no chance to win), we should adjust victory conditions (conquest in this case) to suppose that player defeated in this case.

Link to comment
Share on other sites

Perhaps some simple triggers or logic that calculates the scale of the current situation. What I mean is, after Civ Centres, Fortresses, Barracks, and Docks have all been destroyed, assess how many fighting units the human player has compared to the number of fighting units the AI has remaining, then decide if it is logical to continue to resist. Something like that.

Link to comment
Share on other sites

Perhaps actually some civilizations would do guerrilla warfare if their buildings are destroyed and they do not have the resources to construct any drop off points. I suppose that only countries such as the Iberians or Carthage if Carthage had Hamilcar Barca alive, would actually do stuff like this. They would be counted as a "dead" faction, but the surviving units would still fight. This would probably only happen when they

Edited by Thorfinn the Shallow Minded
Link to comment
Share on other sites

How about:

(Do we have any resource drop off points?

OR

Can we make resource drop off points?)

AND

(Do we have any units that can gather resources?

OR

Can we make units that can gather resources?)

If we return 0, then we can no longer gather resources (either no-where to drop them off or no-one to drop them off) and we should surrender.

(Can we build any buildings?

OR

Do we have any buildings that can train units?)

If we return 0, then we can no longer replace units or buildings and we should surrender.

I think these terms would cover 99% of scenarios where we would want to surrender. They could either be written into a library shared by all AI, or coded into the game as lose conditions. Alternatively, these conditions could trigger Ai to make an all-out attempt to capture either a resource drop-site or a civ-center/barracks/fortress/etc. And if that fails, then we surrender. (When we have no units that can capture buildings AND we can't make units that can capture.)

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...