Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Looking for alternatives to imitate the behavior of enemies than learn in TV3D  (Read 798 times)
masmas
Community Member
*
Posts: 20


« on: May 27, 2008, 06:54:35 PM »

Hi guys, i'm building a proyect to finding treasures, adventure type game, in the land there enemies of course that goes an attack you.

So i build a funtion that lead the bad guys (actor class enemies) to the main actor class and a fuction that record all main actor actions

//This fuction what it does, saving in any simple db all the actions
of the main actor in order we learn where the main actor is moving we updating any 5 sec
StartRecordingMainActorActions(TVActor mainActor)

//This fuction what it does lead kwon bad guys where main actor is and follow there an attack
MoveBadGuy(TVActor mainActor, TVActor badGuy,TV_3DVector vecInitialPositionbadGuy)

Ok here is the question i try with TVAI (probably to newbie to know how to use it :p) but i only know the points of the land and the fastes way to get the main actor.

So in order to make it more fun to the player we need know what the user (human player) is doing with the main actor, normally is a repetive behavior because first time player aways do the same tactics that works in past. I tested with several people and somehow i find a pattern of first time players in my game.

For example main actor always attacks from behind, the third time user do that attack to the badbuy, the badguy will know that and change the action, so third times will no longer work for user (human player) and make user to think in another plan of attack like attack front or attack moving or any other.

So any ideas to build a inference motor and production rules because knowledge database we all ready know it,any help would be great or tip. Perhaps there a way in TVAI objects.


Here are some samples





thanks
Logged
newborn
Customers
Community Member
*****
Posts: 2422


WWW
« Reply #1 on: May 28, 2008, 06:14:59 AM »

http://www.red3d.com/cwr/steer/gdc99/

http://aigamedev.com/archives

Logged

Hypnotron
Customers
Community Member
*****
Posts: 792


« Reply #2 on: May 28, 2008, 06:16:20 AM »

He said he already has code to lead the enemies to the actor in the quickest way.  What he's researching are methods for AI to learn the player's tactics so that they cannot be defeated in the same boring way every single time.

@masmas: I would suggest rather than going through the difficult and complex task of recording player's actions and trying to make sense of them and formulating a counter strategy, that you program your AI to just understand basic combat tactics related to both effective terrain usage (concealment, high ground, cover), group\team actions, weapon selection based on the opponent's weapon and tactics related to the relative advantages and disadvantages the enemy has with respect to a given player (e.g. your enemies are faster but less HP so swarming from all directions after ambushing is best, or your enemy is slow but very strong if doesn't have a ranged attack it must retreat to cover or it will just get picked apart at distance, etc)

So make your AI smart in a general sense and forget about trying to learn how to defeat the player based on their past performance.  Making smart AI like I describe is not easy though and it could require adding allot of "anchors" and "tags" to your level in a map editor so that your AI can learn to recognize things such as a places to duck behind or high grass and smokey patches, etc to use as concealment.

You will also need to spend a good deal of time play balancing weapons and armors and spells and such so that players never have a silver bullet strategy against any and all opponents.

« Last Edit: May 28, 2008, 06:27:32 AM by Hypnotron » Logged
Mithrandir
Community Member
*
Posts: 34


« Reply #3 on: May 28, 2008, 10:49:51 AM »

You may also try genetic algorithms. This way you need to code basic tasks like attack, retreat, call for backup, etc.  but the algorithm will learn to react on player's actions and respond intelligently.

Anyway those links from newborn are very good for starter.
Logged
masmas
Community Member
*
Posts: 20


« Reply #4 on: May 28, 2008, 11:21:16 AM »

thanks a lot for the help that was awesome and really helpful... Grin
Logged
beyonder
Customers
Community Member
*****
Posts: 235


« Reply #5 on: May 29, 2008, 10:29:32 PM »

When I was first learning 3D I made a game kinda like this... for my enemies "Ai" I just mapped every single move the user might make to correspond with several different enemy attacks. Then I 'hooked' the user's control into this ai... so the enemy always knew how to defeat the user... weak enemies would just act 'dumb'.

Behind that there was a sort of global ai... where the user's location and direction where taken care of...

It was my first game... and I've never returned to such games... so I'm sure what you have in mind goes way beyond this... but I thought it might help you know my (simple) approach.  Smiley
Logged
Maroonhawk
Community Member
*
Posts: 99


« Reply #6 on: May 30, 2008, 03:33:18 PM »

Naked treasure hunting while avoiding zombie undeads?

I'M IN.
Logged

Useless applications by a bored teenager
masmas
Community Member
*
Posts: 20


« Reply #7 on: May 30, 2008, 06:44:08 PM »

Thanks beyonder for the tip, that really useful for making an smart ai for bad guys like the other tips from Mithrandir, Hypnotron and newborn.

I have some experience ia and expert systems for financial estimations and projections  with visual prolog and visual lisp but beginning to learn ai for games that is another thing,aleast is more fun  Grin

Maroonhawk, i didn't had time to make some cloth for the models, of course don't supponse to be finding treasures in the night naked  Lips sealed

Here a some update samples Wink



Logged
Lenn
Customers
Community Member
*****
Posts: 352

Ivan Miskelic


« Reply #8 on: May 30, 2008, 08:19:42 PM »

nice giant ass

edit: i mean grass
« Last Edit: May 30, 2008, 08:27:06 PM by Lenn » Logged

Theres a shadow just behind me. shrouding every step I take.
Making every promise empty. pointing every finger at me.
Waiting like a stalking butler, who upon the finger rests.
Murder now the path of must we, just because the son has come.
petroz
Community Member
*
Posts: 603


WWW
« Reply #9 on: May 31, 2008, 04:56:31 AM »

Quote
You may also try genetic algorithms. This way you need to code basic tasks like attack, retreat, call for backup, etc.  but the algorithm will learn to react on player's actions and respond intelligently.

GAs are by nature very slow to get to a result. I given thought to applying them to this sort of problem but i think it would be both difficult to set up properly and take ages of testing to actually get any meaningful results from it.
Logged

Happiness is found in your kindness.

Project: BattleSpace
Gallery URL:
http://s235.photobucket.com/albums/ee185/PeterStirling
masmas
Community Member
*
Posts: 20


« Reply #10 on: June 04, 2008, 05:49:49 PM »

Hi Petroz i try several grass picture and all detail even the CONST_TV_LANDSCAPE_PRECISION.TV_PRECISION_BEST

if u made it slower that an 512x512 you get ugly results, if you use the with 512 size image and small grass sample the render look really bad

And yes Lenn the mesh had giant ass i mean grass  Grin

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks