Jump to content

bot PETRA_Expert.More active bot, compatible with A27.


mod_3d
 Share

Recommended Posts

On 12/05/2025 at 1:48 PM, Seleucids said:

A demo video of Petra_Extreme against Petra on Mainland. This time it didn't make 130 women. I think yesterday's incident was caused by Coastal Ranges map or some other weird settings. 

This bug is fixed in version 0.7.1

Link to comment
Share on other sites

  • mod_3d changed the title to bot PETRA_Expert.More active bot, compatible with A27.

UPDATE: Version 0.7.3

Changes:
Fixed a bug with recruiting Champions
Fixed a bug with recruiting Support units, set the limit to 50.
Added recruitment of Cavalry and Infantry at the start of the game for more defense against early rushes.

PETRA_Expert vs Base PETRA
3.thumb.png.c8a877de08e4ac7f2a8263b25aa29fa7.png

5.thumb.png.543dd5d6f91146a82fdc9266ad3f9fd7.png

 

  • Like 2
Link to comment
Share on other sites

Hey @mod_3d, I've tried playing your mod and watched your AI play one game against Hard Petra. Some impressions:

1) I've played against Mauryans, and they made no siege whatsoever. Some elephants only. His attacks were tickling my forward Fort, until I went out and crushed him. 

2) The bot heavily prefers making a lot of citizen soldiers, to the detriment of nearly everything else. While this means that he will have a huge army, it will be fairly weak by the time I arrive. 

3) The bot expands late, hurting its map control. I usually don't make a lot of CCs, but I had 4 of them while the AI had only 2.

4) In the AI vs AI match, the bot played as Romans. While his boom was much better, he got stuck in the late game, failing to finish off his opponent and amassing a huge stockpile. It just kept making CCs until I quit.

All in all, the bot is much better in early to mid game, but Petra is still more stable in the late game. She is also more threatening, because of the siege engines she likes to make.

Thanks for making a cool bot for us. It microes very well.

  • Like 1
Link to comment
Share on other sites

13 hours ago, Deicide4u said:

@mod_3d, when will the most up-to-date version be available on mod.io?

Also, the 0.7.3 version has a bug on most standard maps. The AI will not make a house and get pop-blocked forever.

Mod updated. If there are no critical bugs, I will send for verification on mod.io after some time.
On what maps and game settings do not build houses?

Link to comment
Share on other sites

UPDATE: Version 0.7.4

When retreating, support units will enter the garrison if there are relevant buildings nearby.

After building a Temple, the bot will recruit 5 Healers and add them to rush groups, etc.

Added individual queues for Siege units and Elephants. As soon as these units become available, they will be recruited with higher priority.

Reduced conditions for moving to the next phase and building a second Civ Center.

  • Like 1
Link to comment
Share on other sites

2 hours ago, mod_3d said:

On what maps and game settings do not build houses?

Mainland, Continent. Normal size.

He also begins by training infantry and cavalry, not females. 

I'll test the new version. 

Edited by Deicide4u
Link to comment
Share on other sites

1 hour ago, Deicide4u said:

Replay of me playing the Petra Expert Medium on Mainland. No major bugs, but the bot did throw most of it's units away on the first push. Maybe it's harder when the bot is set to Defensive?

I've even played badly, didn't utilize most of the Roman benefits.

In the replay, the difficulty level is set to Medium, and the behavior is  Balanced.
These settings have limits on the number of units (for example, gain 140 units and stop despite the maximum limit), they can also limit building, technology and the number of units in the rush.
The mod is tested on Very Hard, the behavior is Aggressive.
A map with a low amount of resources also affects the bot's play.

Screenshot_20250711_123949.thumb.png.04b7fabe957fc452cc1ed44a2a5e238c.png

Link to comment
Share on other sites

1 hour ago, mod_3d said:

In the replay, the difficulty level is set to Medium, and the behavior is  Balanced.
These settings have limits on the number of units (for example, gain 140 units and stop despite the maximum limit), they can also limit building, technology and the number of units in the rush.

I didn't know that. I thought that Medium bot builds and trains everything. In any case, Hard and Very Hard difficulties should only affect the resource modifier.

Medium should be a "fair" challenge to the player.

Link to comment
Share on other sites

  • 2 months later...

Hi! I've got a following error after some time playing:

ERROR: JavaScript error: simulation/ai/petra_expert/attackManager.js line 1132
army is not defined
  PETRA_EXPERT.AttackManager.prototype.switchDefenseToAttack@simulation/ai/petra_expert/attackManager.js:1132:20
  PETRA_EXPERT.DefenseManager.prototype.checkEvents@simulation/ai/petra_expert/defenseManager.js:563:35
  PETRA_EXPERT.DefenseManager.prototype.update@simulation/ai/petra_expert/defenseManager.js:23:7
  PETRA_EXPERT.HQ.prototype.update@simulation/ai/petra_expert/headquarters.js:3508:22
  PETRA_EXPERT.PetraExpertBot.prototype.OnUpdate@simulation/ai/petra_expert/_petraexpertbot.js:118:11
  m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:7

The error repeats every game tick. Also, there is a bunch of warnings like these:

WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/civil_centre with count < 0
WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/crannog with count < 0
WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/military_colony with count < 0
WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/house with count < 0
WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/ice_house with count < 0
<... much more like this ...>
Link to comment
Share on other sites

5 hours ago, yaroslav said:

Hi! I've got a following error after some time playing:

ERROR: JavaScript error: simulation/ai/petra_expert/attackManager.js line 1132
army is not defined
  PETRA_EXPERT.AttackManager.prototype.switchDefenseToAttack@simulation/ai/petra_expert/attackManager.js:1132:20
  PETRA_EXPERT.DefenseManager.prototype.checkEvents@simulation/ai/petra_expert/defenseManager.js:563:35
  PETRA_EXPERT.DefenseManager.prototype.update@simulation/ai/petra_expert/defenseManager.js:23:7
  PETRA_EXPERT.HQ.prototype.update@simulation/ai/petra_expert/headquarters.js:3508:22
  PETRA_EXPERT.PetraExpertBot.prototype.OnUpdate@simulation/ai/petra_expert/_petraexpertbot.js:118:11
  m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:64:7

The error repeats every game tick. Also, there is a bunch of warnings like these:

WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/civil_centre with count < 0
WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/crannog with count < 0
WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/military_colony with count < 0
WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/house with count < 0
WARNING: PlayerID 6 |    Petra Expert error in incrementBuilderCounters for structures/iber/ice_house with count < 0
<... much more like this ...>

UPDATE: Version 0.7.5 
Thanks for the report.

Link to comment
Share on other sites

10 hours ago, nmv said:

Thanks for the quick fix. Works great! Though I had to uncomment

headquarters.js:925: let maxCitizenSoldiersMelee = 40;

Otherwise 'undeclared variable' warning was popping up all the time

Mod updated
Thanks for the report.

Link to comment
Share on other sites

  • 1 month later...

Noticing an issue with this bot; on lower difficulties, (specifically I'm playing on Very Easy at the moment), I get spam in the logs which says "warning: Invalid command: Can't train 0 units" once Markets are built.  This issue doesn't appear to happen on higher difficulties.

  • Like 1
Link to comment
Share on other sites

8 hours ago, Jackerino said:

Noticing an issue with this bot; on lower difficulties, (specifically I'm playing on Very Easy at the moment), I get spam in the logs which says "warning: Invalid command: Can't train 0 units" once Markets are built.  This issue doesn't appear to happen on higher difficulties.

UPDATE: Version 0.7.6 
Fixed a bug when recruiting units on the very easy difficulty setting.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 4 months later...

Hi all,

awesome work! Tiny modifications to get it to run on Alpha 28 :-)
@mod_3d Feel free to check it and/or upload on the main page. Was just interface adaptions. I played a quick game with it and it seemed to work without incidents.

PETRA_Expert.zip

Link to comment
Share on other sites

On 10/03/2026 at 7:32 PM, Lars V said:

Hi all,

awesome work! Tiny modifications to get it to run on Alpha 28 :-)
@mod_3d Feel free to check it and/or upload on the main page. Was just interface adaptions. I played a quick game with it and it seemed to work without incidents.

PETRA_Expert.zip 190.29 kB · 9 downloads

Hi!
A new bot (R28-Bot) has already been released for game version 0.28.

Forum Page:
https://wildfiregames.com/forum/topic/140620-mod-r28-bot-bot-for-the-release-version-of-the-game-with-advanced-settings/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...