Hero Mages

Developer Diaries => Game Design => Topic started by: Ross Przybylski on October 08, 2010, 02:34:41 AM MT

Title: Hero Mages – All About the AI
Post by: Ross Przybylski on October 08, 2010, 02:34:41 AM MT
Greetings everyone!

Today I officially announced that Hero Mages v1.5 will be released on Monday, October 11th 2010. See the full details here: https://heromages.com/news/announcements/v1.5Launch.html

While I'd ideally have preferred to fine tune the AI more before the public release, I've decided to move forward with the early release due to the high player demand for the new AI feature as well as the need to have the AI included in my entry for the 2010 Indepenent Games Festival.  Besides, one of the awesome benefits of being a web-based game is that I can update it whenever I want to deliver you new and better features!

So, if you've landed on this page it probably means one or more of the following:
A)   You're looking to learn more about the Hero Mages AI
B)   You have questions about the AI
C)   You're here to offer your feedback on the AI

I'll get started by explaining how the AI works and then offer some insights on aspects I am still working to implement for future releases.

How the Hero Mages AI Works:

The key to the AI’s ability to prioritize decisions results from a combination of:

Targeting Priority for each unit is calculated using a combination of 3 factors:

That sums up the basic principles governing how the AI works.  I’ll leave it open for questions for those looking to learn more about it.  Next let's take a look at functions I'm still working on that probably won't make it in time for the first AI release.

The Top AI Functions Still in Development:

That's all for now.  Let me know what you think!
Title: Re: Hero Mages – All About the AI
Post by: FrontaLobotomy on October 08, 2010, 04:02:40 PM MT
Well. This makes for a long weekend, waiting for Monday!  My knowledge of programming is nil, and I havent had my coffee yet, so I will judge based on performance. Cant wait Ross, well done! Indie pub hosting with the new additions should be very productive.
Title: Re: Hero Mages – All About the AI
Post by: Ross Przybylski on October 12, 2010, 03:13:25 AM MT
The A.I. is now available in v1.5.  Let me know what you guys think!
Title: Re: Hero Mages – All About the AI
Post by: Gorstak on October 12, 2010, 02:55:33 PM MT
i think its great,yust maybi they rush with their mage into atk too much and then they easy target.
Title: Re: Hero Mages – All About the AI
Post by: Vinman on October 15, 2010, 02:40:22 AM MT
First off, Kudos to Ross, you did a great job. I can tell it took lots of hard work.

I would like to point out a few things that may improve the A.I.

1. Their mage is too aggressive and is exposed for a counter attack - easily killed
2. The positioning is good, keeping 6 spaces away, but on several times I've seen the sorc move around behind it's own guardian to lightning my guy vs lightning where it stood to avoid zapping a friendly. Also, it needs to learn to block with it's guards and summons. The A.I. moved a summon out of the way so I had a clear run at it's mage.
3. Use of spells. It casts blind on my sorc after rushing me with it's mage, only to have  my pali bless then kill off it's exposed mage. Also, uses shield on a guard vs the mage or on the mage when it is not threatened.
4. Un-stun. I've seen the A.I. wack a freindly to un-stun it, only for the freed unit to not attack. Why take a hit to sit still?
5. Troop selcetion is random at all times. If "chosen secret" is select, I would like to see a better combonation of troops.


I've battled the A.I. in 1v1, 2v1 (2 A.I.), 3v2 (3 A.I.), and 4 man FFA (3 A.I.)

In 1v1 the A.I. will lose 95% of the time. It is much harder to win against 2 of them. In a 3v2, it is closer to 50-50. In a 4 man FFA with 3 A.I., the A.I.'s go after one another.

Again, great job and fun to play, but a human opponent is much more difficult to beat.
Title: Re: Hero Mages – All About the AI
Post by: ShadowTiger on October 15, 2010, 11:25:48 AM MT
I just started playing this game today. The AI is pretty difficult to beat, and sometimes I feel it is because of chance more than skill. Also certain heroes like the barbarian can be overwhelming. Since I am limited in what heroes i can use, Its hard to tell if all them are balanced.

I noticed a bug... once the AI attacked its own mage with a rogue and killed it, when my mage was 2 spaces above... both mages were in range and both had 2 hit points.

I am struggling to learn how to win... so far I have won 1 battle of about 6 or 7. I often make a stupid mistake but also it is hard to predict that the enemy will cast 2 fireballs and an ice shard in one turn. I can't be sure since I don't know the game that well and since I cant see the enemy crowns, but I feel like sometimes the AI casts more spells in one turn than should be possible.

I noticed that the AI attacked its own unit to wake  it up from stun, dealing 2 damage to it. I subsequently killed the unit. I think it should have attacked one of my units instead or attacking its own unit.

Anyways I like the game and the AI seems pretty well done... just make sure its not cheating or making stupid mistakes.
Title: Re: Hero Mages – All About the AI
Post by: kefkam on October 16, 2010, 08:06:25 AM MT
2vs2 chocke point:

the first turn plays computer1. move FM, cast water elemental, attack with water to the sorcerer, sprint with the FM (exposing him), sleep the bard (just above the sorcerer).

ok. so much risking for nothing but ok. but then he did this:
warrior use protect on soul reaver. they two doesnt move to help the FM or go closer to the enemy.  actually they move to be a little farther.
Title: Re: Hero Mages – All About the AI
Post by: FrontaLobotomy on October 16, 2010, 08:12:10 PM MT
I have noticed a lot of protection spells(fighters protect ability, shield, imprison) used by the cpu when not needed.  As in behind multiple walls, or first turns. Fine when your playing against them! But not so good when your teamed with one.

a lot of exposing the Mage too, leaving him vulnerable.

I like the aggressiveness, and it has actually beat me down a couple times, but not often. even in 2 bots vs me or me and a bot vs 3 bots.  Overall tho, it is a very impressive start on the A.I. and i dont think ive ever seen a bot mino use his sprint attack ability.  even tho the mino had no other real action to take.


But i do see how as it is, for first timers, or players with only a few games experience, can really be challanged by it, and learn quickly some important tips for playing.

addressing ShadowTiger

Quotebut also it is hard to predict that the enemy will cast 2 fireballs and an ice shard in one turn. I can't be sure since I don't know the game that well and since I cant see the enemy crowns, but I feel like sometimes the AI casts more spells in one turn than should be possible.

Sorceresses, and wizards can often cast far more spells than other mages, due to their valor abilities, sorc gets 2 spells for no mana, so can FB and bolt for 0 mana cost, leaving 3 mana to use on actual spells
Title: Re: Hero Mages – All About the AI
Post by: the stoat on October 21, 2010, 02:38:55 AM MT
So it's been a week of AI, and I have played against it soooo much before crafting these comments:

- overall, I think it's brilliant. Good to see you launched it without trying to make it perfect first
- it's good to see most of the priority AI problems are identified
- In the meantime, can we set up an armour modifier, roll modifier, or similar to make the AI more threatening in 1v1? (ie. give the AI guys extra armour or dice)
- AI blocks teammates move paths. IMHO, a fix is needed as priority 2 behind the protect mage improvement
- AI needs a 'mage rush' command. ie. pretty much the only way to beat a mage if you have only guardians left is to rush said mage. A paladin that retreats to cast combat healing just gives the mage time to gain and cycle cards. So once AI mage is killed, guardians need to be more aggressive, and worry less about the '6 space gap'
- AI needs a stronger motivation to attack a single target, rather than doing 2 damage to 3 targets.
Title: Re: Hero Mages – All About the AI
Post by: Ross Przybylski on October 21, 2010, 03:24:20 AM MT
Thanks everyone for the feedback!  I find it interesting that veteran players find the AI too easy while newer players find it too difficult- probably a good indicator that the current difficulty is "Medium".

I'm also glad, though somewhat surprised no one has reported any bugs yet (for instance, illegal moves being performed or games locking up to internal errors).  One issue I had seen a few times during testing was players getting extra turn time after a bot had been eliminated; not sure if I managed to get that ironed out or not in this release.

Most feedback thus far seems focused on the general over-aggressiveness of the mage and need for difficulty levels- both of which are high on my priority list.  Other things I overlooked are the "attack to unstun" its own guys issue which as some have pointed out, doesn't always work to the AI's benefit as it either kills its own guys or doesn't do anything with the unstunned units.  I should also consider, as stoat suggested, having the AI consider avoiding positions that obstruct ally movement and priortizing attacks based on elimination of single units vs. highest possible attack threat.  Guardians in general need to more aggresive in general I think; I've seen too many games where support characters stay in the back too often to avoid being attacked when they should be pushing more on the front line to cover the mage and attack.

I'm also surprised at the recent player counts in the lobby.  I had presumed the AI and IndiePub feature would attract more players, but perhaps it's causing the opposite effect as players are getting an overdose of HM playing the bots?

Keep those comments comin'
Title: Re: Hero Mages – All About the AI
Post by: ZaWolf on October 21, 2010, 07:57:56 AM MT
I think while the computer is fun... it's only fun with another player.  E.g. 2 players vs 4 computers.  It just doesn't replace the interaction you get when playing another person.  It does add to the game, however.  The reason I don't play this game 5 hours a day, is really because I rarely get a chance with no one being in the lobby.  And computer is basically the same as a player, except less challenging, and you can't chat with them.  Which believe it or not, really takes away from the game play.  I think when you start incorporating quests w/ unique computer characters, that people will stay just to play the computer--- which will get people playing longer--- which will increase the chance that multiple users are on at once-- which thus makes the user more apt to continue playing this game, etc..
Title: Re: Hero Mages – All About the AI
Post by: the stoat on October 22, 2010, 03:44:30 AM MT
"I'm also surprised at the recent player counts in the lobby.  I had presumed the AI and IndiePub feature would attract more players, but perhaps it's causing the opposite effect as players are getting an overdose of HM playing the bots"

I'm a bit surprised to see the lobby empty too. Has, at the least, the conversion from guest to registration gone up?
Title: Re: Hero Mages – All About the AI
Post by: Sinney on November 22, 2010, 04:48:13 PM MT
Been a while since I've looked at the forums...

I can't add too much more that hasn't already been said about the AI difficulty.  I agree mostly with Vin's points about the over-aggression and some not-so-smart other moves by the AI.  The difficulty settings should fix that for sure.

As for the lower numbers in the lobby.  I can't say there is a certain correlation between lobby population and introduction of the AI, but it does seem that since AI was introduced, less people are around.  Honestly, I think it's probably just because people used log on at different times, but would wait around a bit for other players to join and start a game.  With AI now though, people just log in, see nobody, fire up a game or 2 against the AI, get bored, and then log off.  Just an observation, and really no idea if there is a true correlation...
Title: Re: Hero Mages – All About the AI
Post by: Gorstak on November 22, 2010, 10:15:20 PM MT
I only can say that its quite sad that lobby became a desert(