Jump to content

bot PETRA_Expert (0.5.3).More active bot, compatible with A27.


mod_3d
 Share

Recommended Posts

Adds a more advanced bot(based on PETRA) to the game.

The bot is better configured to play on a Medium Map(with good amount of resources) and a Unit Limit of 300.

498772792_newbotscreenshot.thumb.png.36e57847d8728a75f298f5e6b19b670b.png

UPDATE: Version 0.5.3

Spoiler

The bot gains an additional bonus to vision range for units and buildings, depending on the difficulty level:

Hard +50%
Very Hard +200%

Territory Influence Radius:

Hard +7%
Very Hard +15%

Added ability to train dogs for Brits from the start of the game.

Market

Bot will not buy a resource if:
1.it is not needed at the moment
2.if there is more resource (to buy), than the resource (to sell).

Optimized unit recruiting in Corral. No more than 2 units in the queue for each building.

The first Technologies from the Forge are given a higher priority for research.
The first Stone and Metal Technologies have been moved to the Town Phase.

Fixed a bug when researching technology in Port.

 

 

 

UPDATE: Version 0.5.1

Compatible with 0.27.0

Economics

When recruiting workers, mercenaries no longer belong to this class (as they do not have the resource gathering skill).
Factions that have access to mercenaries will first recruit a certain number of workers from their units, then mercenaries.

For faster economic recovery
Added scripts that check the number of Support units in each game Phase, if there are fewer units, their recruitment priority is increased.

Construction of Special Buildings:
These are built as soon as they become available to a faction.
For example, Carthage will build all 3 Embassies in Phase 2, not Phase 3.
Sparta will build a Syssition on Phase 1 and a Senate on Phase 2, not Phase 3.

Corral - 5 in total.
Build from the beginning of the game.

 

 

UPDATE: Version 0.3.0

For the Volatile Market mod:
Added a feature for building an Embassy.
Prioritize exchanges to get resources(food, wood, stone, metal).

barter3.thumb.png.567b69d975aa4d6e15e6dbaface40024.png

Batch Size changes depending on the amount of food resource available. The more resource available, the larger the size can be.

 

 

UPDATE: Version 0.2.1

Changing priorities and some other settings.

UPDATE: Version 0.2.0

Bot adapted for the Volatile Market mod.

 Actively barters new resources and researches technologies.

 

Settings are more noticeable after 15-20min of play.

Focused on players with experience.

Bot with the same bonuses for each difficulty level as the basic PETRA.

 

At population limit(e.g. 300) it will hire units up to the ceiling.

More technology and economy oriented at the start.

More active in the Market.

Builds more buildings to hire units.

 

 

 

 

 

 

 

 

 

bot_PETRA_Expert.zip

Edited by mod_3d
  • Like 4
  • Thanks 2
Link to comment
Share on other sites

  • mod_3d changed the title to bot PETRA_Expert (0.2.0).More active bot, compatible with Volatile Market.
  • 4 weeks later...
  • mod_3d changed the title to bot PETRA_Expert (0.2.1).More active bot, compatible with Volatile Market.

Does this bot program look for market conditions like "price stability" or the volume of the resource(s) at the best prices?

On 23/04/2024 at 1:51 AM, mod_3d said:

More active in the Market.

 Appears there is a narrow difference between each prices at which prospective purchasers are willing to "buy" and which sellers were willing to "sell".

On 23/04/2024 at 1:51 AM, mod_3d said:

 Actively barters new resources and researches technologies.

Can you provide a bit of an in-depth explanation as to what "active/actively" means in specific. Thanks. Neat mod.

Link to comment
Share on other sites

20 hours ago, Palaiologos said:
On 23/04/2024 at 8:51 AM, mod_3d said:

 Actively barters new resources and researches technologies.

Can you provide a bit of an in-depth explanation as to what "active/actively" means in specific. Thanks. Neat mod.

 

Technologies:
Higher priority for those that give a bonus to the gatherer (stone and metal moved to phase 1) and a few others (house population, new technologies and forge).

 

 

Market Price Search:
Several parameters are taken into account when selecting an item to “buy”.

1. The amount of available resource (which is selected for “sale”).
The more available, the lower the buying price can be.
Example:
if available
100 - rate  90
500 - rate 75
1000 - rate 60

2. Resources are infinite or not.
New resources and food in the game are infinite, so when bartering them for resources that are finite, the rates are set to lower values.
Conversely, if a resource is finite, the rate for selling it is set to a higher level.

For example, the base rate is set to 80:
When bartering 100 metal for food, the rate is set to 80+10. Thus, bartering is done if the price of food is greater than 90.
When bartering 100 food for metal, the rate is set to 80-20. In this case, barter is performed if the price of metal is greater than 60.

3. Uniqueness of the Resource
Coins have an increased base rate 165. It is bartered when there are high price spikes in the Market.

 

The activity of the barters has been increased by changing some restrictions.
For example, in the base version of the game, bartering is allowed if more than 500 resources are available. In the mod this parameter is reduced to 100.

 

  • Thanks 1
Link to comment
Share on other sites

  • mod_3d changed the title to bot PETRA_Expert (0.3.0).More active bot, compatible with Volatile Market.
  • mod_3d changed the title to bot PETRA_Expert (0.5.1).More active bot, compatible with 0.27.0.
On 23/04/2024 at 1:51 AM, mod_3d said:

Adds a more advanced bot(based on PETRA) to the game.

498772792_newbotscreenshot.thumb.png.36e57847d8728a75f298f5e6b19b670b.png

UPDATE: Version 0.5.1

Compatible with 0.27.0

Economics

When recruiting workers, mercenaries no longer belong to this class (as they do not have the resource gathering skill).
Factions that have access to mercenaries will first recruit a certain number of workers from their units, then mercenaries.

For faster economic recovery
Added scripts that check the number of Support units in each game Phase, if there are fewer units, their recruitment priority is increased.

Construction of Special Buildings:
These are built as soon as they become available to a faction.
For example, Carthage will build all 3 Embassies in Phase 2, not Phase 3.
Sparta will build a Syssition on Phase 1 and a Senate on Phase 2, not Phase 3.

Corral - 5 in total.
Build from the beginning of the game.

 

 

UPDATE: Version 0.3.0

For the Volatile Market mod:
Added a feature for building an Embassy.
Prioritize exchanges to get resources(food, wood, stone, metal).

barter3.thumb.png.567b69d975aa4d6e15e6dbaface40024.png

Batch Size changes depending on the amount of food resource available. The more resource available, the larger the size can be.

 

 

UPDATE: Version 0.2.1

Changing priorities and some other settings.

UPDATE: Version 0.2.0

Bot adapted for the Volatile Market mod.

 Actively barters new resources and researches technologies.

 

Settings are more noticeable after 15-20min of play.

Focused on players with experience.

Bot with the same bonuses for each difficulty level as the basic PETRA.

 

At population limit(e.g. 300) it will hire units up to the ceiling.

More technology and economy oriented at the start.

More active in the Market.

Builds more buildings to hire units.

 

 

 

 

 

 

 

 

bot_PETRA_Expert.zip 163.3 kB · 15 downloads

OPPP I wanted to learn some coding to improve bot, hope it works with historical patch.  Will maybe help with testing things out!

Thanks

Link to comment
Share on other sites

49 minutes ago, Player of 0AD said:

Also, the bad bartering stops the bot from going into phase 3 within a reasonable time.

Furthermore, it never seems to train women from houses even if it's Roman. At the other hand, the total number of economical units can grow very big. Is it a bot or is it @Atrik? Lol

if it doesnt train women from houses, definitely isnt @Atrik

It crashed 0ad twice the times i had it enabled... Ill have to see if i can figure out whats going on.

  • Haha 1
Link to comment
Share on other sites

On 26/02/2025 at 5:39 PM, Player of 0AD said:

The bot would be stronger, if it wouldn't build corrals that early. Also, the corral tech is researched extremely late.

It seems to waste a lot of resources at the market, buying away expensive resources for cheap wood.

During the tests, the first Corral is built at the start of the game with the technology being researched after that.
In the update, the Corral is optimized.

Bartering at the Market has also been changed.


 

On 26/02/2025 at 7:42 PM, Player of 0AD said:

Also, the bad bartering stops the bot from going into phase 3 within a reasonable time.

Furthermore, it never seems to train women from houses even if it's Roman. At the other hand, the total number of economical units can grow very big. Is it a bot or is it @Atrik? Lol

1. If the Population Limit is set to 200 units, the ratio of Support units to the rest may be high.
 The bot is better configured to play on a Medium Map(with good amount of resources) and a Unit Limit of 300.

2. Training from houses may need to be coded separately.

Link to comment
Share on other sites

  • mod_3d changed the title to bot PETRA_Expert (0.5.3).More active bot, compatible with 0.27.0.
  • mod_3d changed the title to bot PETRA_Expert (0.5.3).More active bot, compatible with A27.

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...