Jump to content

ArchMod-0.3 - Game Mode & AI Handicap Settings and more [a23]


Arch Bot
 Share

Recommended Posts

Hello guys, this is my first message in this forum and it will be my first contribution to the 0ad community. First of all I'd like to thank to everyone for creating this great game.

I have started developing ArchMod to improve 0ad gaming experience according to my expectations from an RTS game.

In addtion, I would like to improve current PetraBot AI as an alternative AI bot. I never think to replace the current PetraBot AI. Actually, I was very surprised when I saw only PetraBot in my first installation of this game. I think there should be many different AI bots. I would like to create a new AI called ArchBot for this purpose. Of course, my starting point is PetraBot :)

Installation: After extracting the compressed file to the data/mods path,  you can easily install it from Mod Selection section.

ArchMod-0.3 [ ArchMod 0.2 + Game Modes ] : ArchMod-0.3.tar.gz

gameMode.jpg

Now you can play 0ad in different Game Modes like as in Civilization. This option changes only tech costs, tech upgrade time and correspondingly barter trading mechanism.

tech-Barter.png

ArchMod-0.2 [ ArchMod 0.1 + Extra Options ] : ArchMod-0.2.tar.gz

Bug fixes, Zero starting resources, Gigantic map size and extra game speed options.

ArchMod-0.1 Initial Release Announcement [ AI Handicap ]: ArchMod-0.1.tar.gz

Most of the RTS games use AI cheating for harder AIs. I don't like to play against these cheating codes. I think good AIs should beat even expert users without any extra bonus. ( I have started to contribute AI development by forking Petra as Arch Bot.)

I think instead of embedding in AI difficulty, AI bonus/penalty setting should be a separate option like AI difficulty. Therefore, I have created an extra option called "AI Handicap" for AI players. I wish the developers will add this new feature to the next release :)

handicap1.jpg

 

handicap2.jpg

 

I've kept default penalty settings for AIs easier than Medium AI, but I fixed bonus rates to 1 for other AI levels.

In addition, I've added 10 more Very Hard AI levels for AI development and called them as Insane AI levels ( I - X ). These levels are also playable with default AI PetraBot, just an AI index increment.

insane-AIDiff-Levels.jpg

Installation: After extracting the compressed file to the data/mods path,  you can easily install it from Mod Selection section.

ArchMod-0.3 ( ArchMod-0.2 + Bug fixes,  Different Game Modes )  ArchMod-0.3.tar.gz

ArchMod-0.2 ( ArchMod-0.1 + Bug fixes, Zero starting resources, Gigantic map size and extra game speed options )  ArchMod-0.2.tar.gz

ArchMod-0.1 (Initial Release, AI Handicap Setting & Insane AI levels)    ArchMod-0.1.tar.gz

Edited by Arch Bot
ArchMod 0.3 release
  • Like 4
  • Thanks 2
Link to comment
Share on other sites

27 minutes ago, Arch Bot said:

ArchMod was developed and tested on 0ad a23.1-10. But, I will update it for further releases.

Very much thank you for your hard work hopefully Angen will look at it this indeed will be very useful if you want you can also improve ai with other developers through patches put on phabricator for 0.24 version, it might many times speed up reviewing and inclusion btw some mods such as Hyrule Conquest by @The Undying Nephalim and @Exodarion 

do their own ai because of specific or unique requirements of those factions. BTW there is also https://code.wildfiregames.com/D2199  . Hope you will stop by IRC channel in 0ad-dev so others can talk to you about future improvemens for AI. Polite ping @Angen @wraitii

Edited by asterix
  • Like 2
Link to comment
Share on other sites

Hello Arch Bot.

I looked into the changes you made.

First you should remove rate array and just use the equation you introduced. Multiplying 0,42 with 0,05 is 0,021 and not handicap player picked.

Now I am going to present my current opinion if your mod should be merged with codebase.

In most RTS Ais get cheats because they cannot match human thinking and decision making. Else they would be wiped out by any player and there would be no fun at all. Issue is that, with more complex games, Ai needs to think about more aspects and put them into equation. Also it needs to plan for future and to know when top stop current plan because it has to do something else. Also making Ai more complex could be bad trade off with performance. (fun story: I tried to mimic attacking code in defense manager to improve defense, it lagged so hard it was unplayable). Also there is issue what AI actually knows about. As player you move game camera and you can see enemy moving towards you and you know what units it has and how to counter them. That is not case for AI. It can at best check enemy units in some proximity of its structures but doing so for all visible structures and comparing enemy units if they are in the proximity is very resource heavy computation, so mostly it reacts only if gets attacked what is most of the time too late. 

I can agree rate bonus could be separate variable and difficulties could just influence what decision ai takes.
But I am not sure if allowing for example hard ai going under rate of 1 is good idea. That would make it even worse then current medium ai. Also the same for allowing medium ai to go to bonus 100% would make it insane. It would mass units too fast. Current very hard ai has only 56% bonus and few players can beat and they count for ai wasting units with useless attacks and chases their units under their turrets.

So generally speaking, ai is terrible in defense and sometimes lets units die stupidly or it tries to place structures at places it is constantly destroyed, also it wastes resources from time to time. Taking rate advantage from ai at this state would in my opinion make ai more boring to play against as it is right now. 

If you are interested in improving current ai:
For the ai development and comparison it is preferable to remove that bonuses from initgame.js and let current ai fight against the new one with highest mutual difficulty level in various maps, settings and mainly I would suggest to pick for both of them the same civilization.

Team would be more than happy to merge new ai if it turns out being better then current one, without destroying performance.

P.S. : Ai should not be unbeatable.

Regards
Angen  

  • Like 2
Link to comment
Share on other sites

39 minutes ago, badosu said:

> P.S. : Ai should not be unbeatable.

Theoretically unbeatable for sure not, it would be interesting to have an overpowered AI to challenge the best players though ("Impossible" difficulty), see Valihrant vs 4 Very Hard AIs.

I agree, could be interesting and i love handicap. This give more randomization.

  • Like 1
Link to comment
Share on other sites

Thanks @Angen for your feedback

:)

On 6/17/2020 at 12:26 PM, Angen said:

First you should remove rate array and just use the equation you introduced. Multiplying 0,42 with 0,05 is 0,021 and not handicap player picked.

Rate and time array were removed as you suggested in ArchMod-0.3. I've double checked handicap settings are correct in the game play. AI Handicap indexes are between 0 and 39. 0 => -95% Bonus, 19 => No change and  39 => 100% Bonus.

The AI Handicap equation:

SetGatherRateMultiplier(1+(AIHandicapIndex-19)*0.05)

For your thoughts about AI, you are right. But, we can always code better AIs. I would like to improve the current PetraBot AI as an alternative AI. I never think to replace it :)

On 6/17/2020 at 12:26 PM, Angen said:

But I am not sure if allowing for example hard ai going under rate of 1 is good idea. That would make it even worse then current medium ai. Also the same for allowing medium ai to go to bonus 100% would make it insane. It would mass units too fast. Current very hard ai has only 56% bonus and few players can beat and they count for ai wasting units with useless attacks and chases their units under their turrets.

I think the player should be able to choose AI difficulty and handicap options separately. It will be interesting to play against absurd AI bots like Very Hard AI with -95%
 Bonus :) Besides, playing with many AI bots with different AI difficulty and handicap settings means countless different game possibilities.  My intention is exactly to increase this number to have fun and improve my strategic thinking capability.

On 6/17/2020 at 12:26 PM, Angen said:

Taking rate advantage from ai at this state would in my opinion make ai more boring to play against as it is right now. 

The rate advantage is still can be chosen from handicap settings. But, I also want to play against very hard enemy without any rate advantages to AI to test myself.

On 6/17/2020 at 12:26 PM, Angen said:

For the ai development and comparison it is preferable to remove that bonuses from initgame.js and let current ai fight against the new one with highest mutual difficulty level in various maps, settings and mainly I would suggest to pick for both of them the same civilization.

Yes, exactly I'm testing different AIs as you said.

On 6/17/2020 at 12:26 PM, Angen said:

Team would be more than happy to merge new ai if it turns out being better then current one, without destroying performance.

My aim is to create an alternative AI. I don't want to replace PetraBot or other possible bots. I think there should be many different AI bots.

On 6/17/2020 at 12:26 PM, Angen said:

Ai should not be unbeatable.

Of course, humanity will alter the bots before they conquer the world :) I always support and help better AI coding without any AI cheating :)

  • Like 1
Link to comment
Share on other sites

  • 2 years 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...