Jump to content

Does the AI Play to Its Opponent?


thephilosopher
 Share

Recommended Posts

I'm not exactly sure quite how to ask this question, but I'll describe some experiences recently while playing single-player games against the AI (usually on Medium, sometimes on Hard).

 

I've noticed that the AI seems to roughly match my pace of development. When I've developed more slowly, the AI has taken longer to go to Phase III and attack me. Whereas, when I develop quickly and expand my territory more quickly, the AI attacks earlier and develops more quickly. Meanwhile, when I set up games and watch the AI play another AI on Hard or Very Hard, the games seem to drag on forever and the AI develops pretty slowly.

Are these just coincidences? Or does the AI develop more quickly when its opponent does?

Link to comment
Share on other sites

12 minutes ago, m7600 said:

I've never noticed that, but it's entirely possible. For what it's worth, here are PetraBot's scripts.

Maybe the answer is in attackManager.js and attackPlan.js.

Though buildManager.js and some other files are probably related to this issue as well.

Hope that helps somewhat.

 

Thanks! Some of the issue might just be that when I develop more quickly, my cavalry is more likely to wander near the AI's territory when hunting. It could just be responding to having earlier encounters with my cav/troops.

Link to comment
Share on other sites

46 minutes ago, m7600 said:

Here are some other lines that say that Petra will attack the strongest enemy

Interesting. In earlier versions I usually was everyone's favorite enemy, playing with four enemies I could actually count down the attacks. ('Mkay, red and yellow attacked me, where's - ah, there's purple, now let's wait for teal...') That has changed with a25, I guess the accessibility of an enemy now has a stronger impact for the AI.

  • Like 2
Link to comment
Share on other sites

17 minutes ago, Freagarach said:

@Gurken Khan PetraAI will also try to coordinate their attacks with allies. That they don't arrive at the same time is probably due to their walking distance.

I can't remember AIs ever form an alliance AND attacking me. When they attacked me individually I often noticed a very similar timing; sometimes I could watch them fight each other just outside my border. :D

  • Like 1
Link to comment
Share on other sites

17 minutes ago, Freagarach said:

PetraAI is omniscient.

That's what I thought. I'm well behind in any technical details of AI, but when looking at replays from the perspective of the AI, it can see the entire map the entirety of the time. That feature was some of why this came to mind in the first place: I noticed that the AI seemed to behave very differently depending on what I was doing, and then I watched the replay and noticed it could "see" me the entire game.

  • Like 2
Link to comment
Share on other sites

Sort of makes the 'reveal map' option seem like a very legitimate alternative.

Earlier today noticed that when I pop a number of garrisoned troops out of barracks, it knows if a sufficient  number of troops are still inside to hold it and will immediately stop hacking and start capturing if there are not.

Link to comment
Share on other sites

Would it make sense to make her even "dumber" in terms of not being omniscient, in sandbox mode, or as a separate toggle? Admittedly, I'm asking this question more out of curiosity rather than because Petra is too hard to fight (well, we set her to 'medium', so we still have lots of possibilities for challenges). It could be interesting to see her behaviour of she didn't know where her opponents are (just like for human players without an unrevealed map). But on the other hand, it might not be worth the effort to code such an optional setting.

@FreagarachoWould it be complex?

PS and OT:

I cannot delete that misplaced "o" letter when using the mobile (Android) Firefox browser, sorry.

Edited by Ceres
Link to comment
Share on other sites

I think I'd rather not remove the feature from the AI. If anything, it makes the AI a more interesting opponent at any stage of learning how to play the game. It shouldn't take first-timers very long to learn how to beat the AI on Sandbox, even with the AI's omniscience. And once you get past Sandbox, the AI's omniscience seems to help her become a more interesting opponent who doesn't just repeat the same set of steps each time (i.e., attack at 9 minutes, build a barracks here and here, and so on).

Lately I've been working toward the goal of developing about 8-10 units per minute, which seems to be the bare minimum of what really good players do. And even getting into that range, the AI can still throw me a challenge or two when set to Medium (even though I now win on Medium the vast majority of the time).

 

Edited by thephilosopher
  • 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...