Jump to content

Rush and very difficult AI


ljf
 Share

Recommended Posts

Hi,

I have found a strategy to win each times by rushing against each level of the AI (even the most difficult level) on the Alpha 22 version:

The idea is to create a lot of cavalery very quickly and send it kill your enemy directly.

I do like this:

First I send the cavalry man and a woman on chicken.

Next, I run the creation of cavalry men into the forum with a destination point on chicken.

I send 3 others womens on bushes . I don't remember if i put 2 soldats on food on wood.

The 2 lancers go in the opposite on the map.

When cavalry men has finished chickens I send them on the enemy with the 2 lancers. I kill all the unit, with micro managment.

Finally I convert house, like that I can send other cavalry men, If I can I convert the wood building and the infantry building.

A this moment the forum can't create no more units, the enemy is dead (we are about at 4:30, so it's very quick).

I don't know if you know this tips. May be it could be a good things to change some parameters (like slow donw creations of cavalry at the first age ?) or improve the AI ?

What is your point of view ?

Link to comment
Share on other sites

AI in alpha 22 improved with respect to a21. In a21 you could run with 1 horse around AI's perimeter and all soldiers would follow horse so you could kill women and capture buildings easily.

At some point AI always gives up growing even if it has resources. AI can't play with very high res either, it's like it always follows a build order. That problem persists.

Try doing the same vs 2 very hard AIs in same team. Its hard but cav spam still wins.

 

Link to comment
Share on other sites

The AI does somewhat follow a build order, it also waits to age up. It is also centered around phases. It just waits for the next phase to start on some key buildings (even if it can build it in age one). A lot of the AI is based off of hard numbers, 1 barracks, if pop > X, build another barracks. This should explain the high resource problem clearly enough. I think you get the point. It is initialized with the idea of low resources.

It's not just Calvary that this strategy could work with, pretty much anything if you are fast enough. In the beginning, the AI is slow. I'm not entirely for sure but the Civic Centre isn't handled as a military building, just a worker trainer. If you can get troops over there fast enough (before they build their barracks), you shouldn't have to worry.

SVN/A23 - Still waits to age up. Still needs the pop to build another barracks. I don't know if a fix is in the works.

https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/ai/petra/config.js

Edited by SirPope
Link to comment
Share on other sites

@ljf: Congratulations!, you broke the AI :)

I tried your strategy vs 2 very hard AIs in a team. You can even do extra hunting. First you neutralize 1 AI with the cav rush. Then either harrass a bit 2nd AI or better heal and get more cav because it has many men already. Then keep rushing 2nd AI and healing. It takes some time but it's easy.

@SirPope: in svn already you can choose AIs behavior. If somehow AI could choose all those magic numbers dynamically depending of the circumstances I guess it would be op.

  • Like 1
Link to comment
Share on other sites

They still need to reach a limit of population for barracks and a certain amount of time for phase up. You could probably be on city phase and have civcenter's around them by the time they reach town. It might be fixable with a higher boost to priorities, if it's high resource and not ceasefire. Depends on the definition of 'high resource' and how long the ceasefire is though. Plus some of the priorities are a bit of a joke. They are limited by other factors which makes their numbers quiet pointless. Corral and Farms for example (limited by number and resource counts, for good reason). Even better example is the dock. It doesn't matter if there's water, got to be a naval map.

Link to comment
Share on other sites

10 hours ago, SirPope said:

They still need to reach a limit of population for barracks and a certain amount of time for phase up. You could probably be on city phase and have civcenter's around them by the time they reach town. It might be fixable with a higher boost to priorities, if it's high resource and not ceasefire. Depends on the definition of 'high resource' and how long the ceasefire is though. Plus some of the priorities are a bit of a joke. They are limited by other factors which makes their numbers quiet pointless. Corral and Farms for example (limited by number and resource counts, for good reason). Even better example is the dock. It doesn't matter if there's water, got to be a naval map.

The AI is not perfect in any way, so feel free to do some patches and upload them :)

Link to comment
Share on other sites

Honestly I think it needs to be rewritten/adjusted(if possible) and focus on schemes.

If the worker can build something with a resource supply attached to it, it should be look at as a field for that resource. If a building can train something that can be hunted, corral for that resource. If something is restricted to shore, dock. If it's territory is a root, civcentre. If the building has a large attack range, tower. If it boost population and isn't a root, house. So on and so forth. Classes and Template names shouldn't be a priority. The AI should also preferably be allowed to look at the buildings and units in more than one way.

You could pretty much put a category on everything from looking at the techs that they have and the Scheme. Doing it in this manner would make it mod friendly and maybe a bit more 'random'. All this 'looking' and sorting could probably be done in the first second of gameplay. As well as, when the next phase is about to be or has been entered. The empty phasing functions perhaps.

A "what can X do" kind of mentality. I was working on something like this but, I got confused when it came to finding build-able locations... I didn't get far.

The only thing this type of AI would really conflict with(that I can tell from theory) is overhaul mods that drastically change the Scheme... And the updates/changes to the Schemes. The AI would probably only be valid when this game is released and the Schemes are somewhat 'finalized'. Basically, an AI with no hard classes or template names. It finds the buildings/units from looking at the Schemes and it assigns it's own classes to those based on what they can do.

Edited by SirPope
Grammmmer - probably still bad
Link to comment
Share on other sites

I think other AIs can be added to simulation/ai without touching Petra, like when Aegis coexisted with petra.

Then a battle of the AIs could decide the winner.

The thing is: who would do such hard work? Just getting to know the game state, which is huge, is very hard.

  • Like 1
Link to comment
Share on other sites

A starting point is deciphering the schemes and tech (hardest part I should say). Once that is done and figured out it should be surprisingly easy to do pretty much anything. However, I don't understand serialization at all. That and the obstruction map strangeness is what made me stop on my custom AI.

I was thinking of a GetTemplateOfAIClass(AIClasses, MaxRadius, MaxCost, IgnoreClassesOf) type of function. AIClass meaning the one the AI assigned to it. Converting Petra to this would be pretty easy after the sorting and AI specific classes have been assigned. It'd mainly just be replacing hasClass with a separate hasAIClass, and any hardcoded template name with the above function. Easy to find with Ctrl+F. A weight of sorts could be assigned for each template. Depending on the lowest stats found. Updating rarely (number of techs researched and age up). Difficulty (or personality) could adjust the base weights of certain AIClasses. That and the number built already would be the main determinate of what is picked... as well as the regular hasClass. That's would allow it to act more like the modder wants.

I might give the deciphering a shot but no promises. In A22's Petra I had already gotten rid of the hard coded template names. At least most of the them, sentry-towers and defense-towers confused me... that was literally it. That version was based off of classes from just the templates.

Edited by SirPope
  • Like 1
Link to comment
Share on other sites

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