Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
AI boni per difficulty level

Following a conversation in another thread (how difficult would it be to make a good AI for MoO), I made a small enquiry how big are the current 1.31 AI boni, based on the chosen difficulty level.
Here are the complete results:

There are 4 types of straight economic boni and a few other special biases.
1) Research malus for human player (HP)
100% - 125% - 150% - 175% - 200%
On lowest difficulty, both AI and the HP have same amount of research cost. For every level, HP gets extra 25% cost to research.

2) Planet production AI bonus
100% - 80% - 125% - 150% - 200%
AI gets a bonus up to double of HP production. There is a funny bug, as it seems that the boni for the two lowest difficulties are mismatched. Easy is easier than simple, one would say.

3) Missile base cost AI bonus
100% - 90% - 80% - 70% - 50%
Quite self-explenatory.

4) "Free colony ship" - On levels lower than Hard, AI gets a special RND roll to avoid this "cheat" completely. It has minor influence, can delay the ship for 1-3 turns.

--other boni---

5) Diplomatic bias
a) Erratic AIs are more likely to jump at HP (only!) with no cause on higher difficulty.
b) On 2 highest difficulties, if NrAIplayersAtWarWithHP < gameDiff, there is an extra RND check for negative diplomatic step.

6) Different AI decisions based on the gameDiff. These tend to be not well programmed and questionable. They serve more the HP than the AI.
a) AI will retreat less when on higher difficulty setting and overwhelmed. Fighting till the last man... is a sign of stupidity?
b) AI will try its "outrun the missile" manoeuver a lot more often on higher difficulties. Yes, the one that can be so easily exploited.
c) AI will ditch a lot more resources to anti-spying and reserves. Hm.

7) The obvious - the Guardian and Amoeba stats are influenced by the gameDiff settings. This probably does not belong here (although AIs never attack Guardian, so in a strange way, it influences the difficulty level only for HP).


Summa: The boni are surprisingly low! 200% economic bonus on Impossible is nowhere near as terrible as I thought to find. That means, that with all simplicity of Moo 1.31 AI, it performs relatively well (can beat an unexperienced player easily). Compared to its brother MoM (400% boni for impossible, and a lot more them as well), MoO AI is much better.

I think that the game rules suit perfectly to a programmed AI player. With proper work, I bet that MoO AI (Psilon, Human, Klackon) would be nearly unbeatable on 150%. Heck, with a really good AI, an AI Psilon player would wipe the floor with me on equal terms (100-100), more often than not, I am pretty sure.
Reply

Thanks Kyrub. Very helpful. May I suggest you tweaking your point 6 for goal of improved AI? Very straightforward what to do. That alone will reach a long way. Let me know if you need help.
No growth bonus for AI?

Also, I think that MOO is orders of magnitude easier to program AI for than MOM due to lower complexity of game.

My memory from 20 years ago tells me that MOO 1.0 AI did defeat Guardian quite often, particularly Meklar. Can you bring that back?
Reply

Re: Outrun the missile
Should I stop the behaviour completely and raze it from the game? Or how should I define the situation, when AI outruns missile to good effect? Can anybody help?
I remember the first time I saw it, I thought, wow, a clever move. Later, I thought, it improves AI position very rarely. If it improves.

Re: Guardian
There is an "Annihilating" bug that would make capture of Guardian a very simple move. I believe it was present in 1.0 as well. In short, the AI simulation of combat always make both parties to lose at least 1 ship, no matter how strong it is. E.G., when 2 AI scouts meat at a planet, no one survives. So an AI could annihilate the Guardian with 1 scout. (I tried to get rid of this bug in the past, but it won't go, is somehow pretty compicated.)
Reply

Coding optimal behavior against missile is hard. Improving current one is easy.
I would tune 6a before 6b. AI should have a better function to determine when to retreat. A function on enemy and self strength estimate in battle would be good. Objectives too. Then during battle, AI looks at losses. To start: once AI lost >30% of its total HP in battle and enemy lost <30% of total HP then general retreat.

After this part is tested and more or less works, we target 6b. Secondary to the above, AI is never to pull back from enemy missiles if it attacks a planet. It should try to hide behind asteroids though. I also saw AI going around slow missiles well, so that parts should stay if possible.

These alone should improve AI a lot, but again is very little compared to what can be done.

AI-AI battle is very bugged indeed.
Yet, my memory on 1.0 is different. I remember Meklar losing tens of thousands of ships to Guardian then eventually beating it.
Reply

Thanks for response.

(January 17th, 2014, 11:32)WhiteMage Wrote: AI looks at losses. To start: once AI lost >30% of its total HP in battle and enemy lost <30% of total HP then general retreat.
I am doubtful about your rule, as Missile boats can generate bigger difference in losses in first 2 turns, but after that the missile boats retreat. Missile boats (2 racks, fire and retreat) are very common and extremely useful ship design. Maybe - if the ArmyStrength computed by the AI takes Nr of remaining missiles somehow into equation, than it would work.

Quote: I also saw AI going around slow missiles well, so that parts should stay if possible.
Strange. There is nothing in the code suggesting AI can intentionnally dodge missiles. Pure luck I'd say. Can you repeat such behaviour in a battle?

Quote:AI-AI battle is very bugged indeed.
A simmulation not good enough. Same model as MoM, mind you...

Quote:Yet, my memory on 1.0 is different. I remember Meklar losing tens of thousands of ships to Guardian then eventually beating it.
Oh, it is entirely possible within current model for the AI to lose thousands of ships to Guardian... but if it sends it scout to Guardian planet first, the guardian's gone. Also, if thousands of ships lose the battle, the code will malfunction and send the Guardian to hell with them. --- That said, we should probably test removing the "do-not-touch-guardian" condition from the AI code and see what happens. It would improve this poor feature of the game immensely.
Reply

(January 18th, 2014, 16:35)kyrub Wrote: I am doubtful about your rule, as Missile boats can generate bigger difference in losses in first 2 turns, but after that the missile boats retreat. Missile boats (2 racks, fire and retreat) are very common and extremely useful ship design. Maybe - if the ArmyStrength computed by the AI takes Nr of remaining missiles somehow into equation, than it would work.
Sure, the more knowledge you give to the AI, the better decisions it can make. My stated rule did not need knowledge about number of missiles of enemy. Btw, that knowledge alone is still very little. So you just opened Pandora's box of designing strong AI even for the single issue of missiles (attack strength, shield, missile defense, missile speed, missile range, asteroids, wait button, retreat option, special weapons, special items, total firepower, HP per ship, ship speed, expected or planned hit & run, objectives, importance of battle, diplomacy, etc.). You have to tell me what is within scope to target, then we go from there. That's why I stated: "to start". We need fitness function and testing data. We need minimal effort, maximum effect code mods for now.

(January 18th, 2014, 16:35)kyrub Wrote: Strange. There is nothing in the code suggesting AI can intentionnally dodge missiles. Pure luck I'd say. Can you repeat such behaviour in a battle?
Quite deterministic, I would say – less of a luck. Depends on precondition. For example, allow a speed 5-6 AI ship get within range 3 of your planet. Shoot on it with speed 3 missile and AI will go around the missile and reach (or get closer to) planet or ship near the planet. Depends on initial angle of missile shot too. I can look for save games if it is important. It is just a special case of missile evasion I think. Secondary objective of AI to cause damage is pursued while obeying primary objective of missile evasion.
Reply

Re: AI missile dodging.
Ah well. Interesting, now that you explain, I must have seen it as well. Dodging missiles is top of my interest as far as AI issues. go. I hope we make AI more active in this area, I tried but failed in this area.
Reply

Guardian: It would seem with the bug, that if the AI scouted Orion then it would unintentionally defeat the Guardian. Does the AI "know" that the planet is Orion and therefore will not scout it?

Also, I would think that even if the bug wasn't fixed, if the AI would only attack the Guardian once it knew it had a fleet that will win, then it may not matter. Though admittedly it would be humorous to watch the Guardian annihilate under-prepared AI fleets.

Also, doesn't the number of missile bases the AI builds depend on difficulty level?[/Embed]
Reply

Yes. Probably no. Yes. (you are pretty well informed, toddestan)

- AI knows the Orion location from turn 1.
- Guardian is not located as a classic fleet on the starmap, so the AI does not take it into account. Whenever a battle takes place at Orion, Guardian is created out of thin air. Classic example is the know Amoeba bug: when Amoeba arrives at Orion with Guardian already defeated, you will fight Guardian again.
- Indeed, AI has an internal cap on Missile bases based on difficulty. One more questionable setting, as on impossible difficulty AI can build up to 1/2 * POP of missile bases on a planet. Imagine the maintenance...
Reply



Forum Jump: