Cyberlore Majesty Forum Forum Index Cyberlore Majesty Forum
Original Majesty Forum on Cyberlore.com


Quickly building Hero AIs

 
Post new topic   Reply to topic    Cyberlore Majesty Forum Forum Index -> Majesty Wish List
View previous topic :: View next topic  
Cooker



Joined: 20 Mar 2000
Posts: 1710

 PostPosted: Sat Dec 11, 2004 9:24 am    Post subject: Quickly building Hero AIs Reply with quote Back to top

I figured out a few ways to quickly construct convincing hero AI after some study in this field.

The Hero AI should be stochastic, that means a Bayesian Classifier or a neural network would be ideal for this application. Randomized decision tree would also be a valid candidate.

Since a hero should be different from other heroes in his class, we need more then one ďtemplateĒ per class. This is easily obtained by applying learning algorithms above to a player character in heroes of Ardania (TSís game)

Take the example of Talespinner the mildly insane. Every time that hero performs an action, the action and situation under which itís taken would be recorded. Reinforced or supervised learning can then be used to create hero AI that mimic action of that player.

Since different player plays drastically, AI variance within the same class will result. A wizard AI based on Cooker the mighty might be very melee orientated (High melee, defense / offense, spell as support) while one based on thirty swords will be significantly less so.

These AI also respond realistically to a situation, because they are based on player characters. That means an AI based on Talespinner will not run away from a rat at level ten because Talespinner does not.

This also illustrates how would an RPG based on Majesty benefit majesty and vise versa.
 
View user's profile Send private message Send e-mail ICQ Number
Alfryd



Joined: 03 Dec 2002
Posts: 914

 PostPosted: Sat Dec 11, 2004 12:05 pm    Post subject: Reply with quote Back to top

The basic idea is certainly sound, but what concerns me more is how these techniques can be modified to allow an autonomous Hero AI, once initialised, to adapt in-game in response to a changing environment. The hero needs to able to train itself to take new courses of action, based on it's experience of benefits or losses associated. Supervised learning cannot be applied to this process (well, not directly, though a Sovereign dispensing financial rewards meantime have a similar effect.) Bayesian nets have been applied to real-time learning problems before- remember MS Word's Clippy? Me, oh my...
Also, bear in mind that certain hero classes should behave stupidly every now and then. Others might be constrained by a strict honour code or class mindsets. You'd need to set up an expert network based on some dedicated role-players in the old-school tradition. After all, how many human players would really visit an elven lounge? (Unless it's M-rated.) And how many WoDs would really systematically train their resistance to 96+?Shocked
Finally, it might not neccesarily make sense for a hero to know in advance how they ought to act at higher levels. More likely, a hero would discover and explore their newfound powers through experimentation.
I'll try to come up with some kind of mathematical description of the type of network required, but this is far from trivial and will, in any case, probably need a huge amount of tweaking in practice. Not today. Wink
_________________
The living are a species of the dead, and a very rare species.
 
View user's profile Send private message
Cooker



Joined: 20 Mar 2000
Posts: 1710

 PostPosted: Sat Dec 11, 2004 2:55 pm    Post subject: hehe Reply with quote Back to top

Alfryd:
Thanks for your interjection. I think the easiest thing to do is still building AI on top of recorded human behavior. The learning does not have to be turned off in game, as you have kindly pointed out.

I think forward feeding 3 layer classical neural net or Bayesian will do. As for ďStupidĒ behaviors, well letís just say there hasnít being a lot of successful players on HOA Very Happy

And yes, you will get more then the usual share of Magic resistant WOD or melee immure wizards :P

Lastly, I think planning is needed. Itís only convincing that heroes can plan their career in great detail, much like the human player controlling them.
 
View user's profile Send private message Send e-mail ICQ Number
Oasis



Joined: 29 Dec 2003
Posts: 79
Location: Previous Handle: Metal Hands

 PostPosted: Sun Dec 12, 2004 2:03 am    Post subject: Reply with quote Back to top

So what you are saying is hire actors to the postion of roleplaying the different classes? The intelligent design of an ai with a variation that would occur if you had three to five actors per class...or even henchmen. and maybe even build the AI to randomly go down a certain behavior descion tree by having them roll a tensided dice within the game, each randomly being choose of what each number is *thus changing the probality of each hero making the same descion for each hero created.*
 
View user's profile Send private message
Cooker



Joined: 20 Mar 2000
Posts: 1710

 PostPosted: Sun Dec 12, 2004 5:54 am    Post subject: Reply with quote Back to top

Actually we are proposing basing AI on behavior of players in HOA.
If you havenít played it, please do.
 
View user's profile Send private message Send e-mail ICQ Number
XxaxX



Joined: 06 Jul 2004
Posts: 402
Location: Halifax, Canada

 PostPosted: Sun Dec 12, 2004 9:26 pm    Post subject: Reply with quote Back to top

What exactly is HoA? is it another majesty expansion?
_________________
I am XxaxX! (by the way that's spelled CAPITAL 'X' at the end AND front, and it's pronounced Zax, it is supposed to make you tremble, but seeing as my avatar is that of an un-named ranger, i think were past that point) P.S. enjoy the the free rok's.
 
View user's profile Send private message
Lurn



Joined: 25 Jul 2004
Posts: 226

 PostPosted: Sun Dec 12, 2004 10:27 pm    Post subject: Reply with quote Back to top

No. It's an fan-made online game where you play a hero from Majesty, killing monsters, buying potions, etc.

It's free, too. Play it here.
_________________
"It simply doesn't happen. Period.
Why is that? Question mark."
 
View user's profile Send private message Send e-mail
Cooker



Joined: 20 Mar 2000
Posts: 1710

 PostPosted: Mon Dec 13, 2004 4:16 pm    Post subject: by the way Reply with quote Back to top

By the way, with AI this good, we could give spell casters true AOE spells without making them frustrating. Things like Ice storm, true meteor or even large area instant death spell similar to wail of the Banshee in D&D.
 
View user's profile Send private message Send e-mail ICQ Number
Alfryd



Joined: 03 Dec 2002
Posts: 914

 PostPosted: Tue Dec 14, 2004 2:33 am    Post subject: Reply with quote Back to top

That would require heroes with an at least local spacial awareness field. Might lead to a significant rise in processor requirements. A more economical hybrid approach would be to query each candidate target for the hero's degree of like/dislike and aim the spell accordingly on this basis. Similarly for using the AI to navigate around dangerous areas- query for each tile seperately, without having the hero's net possess a corresponding input for every terrain tile. Besides, it's difficult to set up an input layer capable of representing every possible placement of game objects on the map (or even a local vision field.)

While I suppose certain hero classes would plan their careers, didn't you also say you didn't want any two wizards (surely long-term career planners if ever there were,) to learn the same set of spells? It seems unfeasible to provide a dedicated AI for every conceivable combination. Other hero classes might lack the foresight to predict their future proficiencies in detail, or might be able to specialise their skills/stats in similar ways that would prohibit a one-track career ambition.

Quote:
*thus changing the probality of each hero making the same descion for each hero created.*

Mmm. I was thinking heroes learnt new mindsets in-game by experience.
_________________
The living are a species of the dead, and a very rare species.
 
View user's profile Send private message
Cooker



Joined: 20 Mar 2000
Posts: 1710

 PostPosted: Tue Dec 14, 2004 8:02 am    Post subject: combining ideas. Reply with quote Back to top

For true AOE spells (as in meteor storm that demolish half your own kingdom) the spell caster will receive a list of all objects that would be affected by the spell from the game engine. So the spatial awareness will be handled by the engine not the net.

We could create about 10 templates or so for each class based on training data obtained from HOA. The learning however does not stop after the hero is created, he/she will learn from in game situations using reinforcement learning.

The utility value might be a combination of current health, wealth, influence, and so on, much like that of a SIM in THE SIMS series.

Just my other 2 cents :P

Quote:
The basic idea is certainly sound, but what concerns me more is how these techniques can be modified to allow an autonomous Hero AI, once initialised, to adapt in-game in response to a changing environment.


- That is precisely what I meant Razz, HOA patterns are great for initiation.
 
View user's profile Send private message Send e-mail ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Cyberlore Majesty Forum Forum Index -> Majesty Wish List All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum