AI Libraries for Panda3D

Return to Panda Features in Development

Postby NNair » Thu Aug 05, 2010 12:37 am

......................................................

IMPORTANT UPDATE :

......................................................

Updates to the Blender mesh generator :

- Now creation of the full and collision meshes is to be done on the x-y plane. This makes it much easier to just get in to Blender and create a mesh since the starting view is a top view of the x-y plane.

- We did quite a bit of testing and bug hunting and have documented some cases which might break the path finding.

* NOTE : We advice to make meshes with a scale of 50 or above for best results. It would be wise to make your world based on this scale. Much smaller meshes bug out a bit.

* NOTE : To make faces on your plane mesh, use the subdivide utility in Blender in Edit Mode and to delete faces option when you enter Face Selection Mode while you are in Edit Mode.

.....................................................

The latest Blender Mesh Generator and a simple test example of it working in python has been provided at:

http://www.srinavinnair.com/downloads

This is a much more stable version so it is advised to use it over previous versions of the Blender Mesh Generator.


Thanks for your support of PandAI.

For any further assistance, please post here.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby NNair » Thu Aug 05, 2010 12:41 am

@ GarrickW

Please remake your full and coll egg files based on the new blender mesh generator and scale your plane upto a size of 50 then subdivide and test it out.

If you look at the example which has been posted, it will give you a good head start on this.


Good Luck!
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby NNair » Fri Aug 06, 2010 1:11 pm

Also, just as a reminder :

In Panda 1.7.0, to use PandAI it is not libpandai any more but :

from panda3d.ai import *

Cheers.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby Bradamante » Fri Aug 06, 2010 3:05 pm

Tried using PandaAI but it keeps crashing on me. The Terminal just says Segmentation fault or Bus error. Usually I got those when the game is hanging in some infinite loop.

Here are two error messages: http://pastebin.com/5vVEHXZr and http://pastebin.com/qnUkVTTx

Now the fish demo from a while ago works just fine but I am still posting this since I don't see what I did wrong.

Code: Select all
def addToAiEnv(self, ainame, model, mass, movforce, maxforce, sourceid):
      aiChar = AICharacter(ainame, model, 1.0, 1.0, 1.0) # (self, "-1", 100.0, 0.1, 30.0)
      self.aiEnv.addAiChar(aiChar)
      aiBehaviors = aiChar.getAiBehaviors()
      sourcesTargetID = self.ShipObjects[sourceid].selectedTargetID
      aiBehaviors.pursue(self.ShipObjects[sourcesTargetID].ShipModel, 1.0)


And I am just running it as a task

Code: Select all
def updateAiEnv(self, task):
      self.aiEnv.update()
      return task.cont
iMac (2009), Mac OS X.8.1 - MacBookPro (2007), Mac OS X.8.2
@ YouTube
User avatar
Bradamante
 
Posts: 303
Joined: Tue Nov 25, 2008 10:58 am
Location: Leipzig, Germany

Postby NNair » Fri Aug 06, 2010 3:38 pm

@ Bradmante

I would suggest the best way to test out PandAI related bugs is to first create a simple program which uses the ai. So in this case a simple model pursuing another model.

If this works, then there is an error in the game code rather than the AI code. I can provide a simple sample of this if so required. Though I think it is pretty trivial from the documentation.

On another note,

I looked at the stack trace you gave me and from the code you have posted it is hard to debug what the error could be. Is it possible that it is trying to pursue a null object or that the object gets destroyed and the ai is still trying to pursue it ?
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby Bradamante » Fri Aug 06, 2010 6:06 pm

Well, if you got a sample program ready, please post it. Though as I said the fishing sample works. What I am doing is quite simple. Just pursue another node. That node is another space ship and it's alive and well. I'd like to point out that my project has reached a certain stage of complexity and that it is specifically the libpandaai.dylib crashing. I am propably the first OS X user using PandaAI. Quite often I'm thinking that about features.

Is there documentation in the manual? I mean the node path that is being followed doesnt have to be part of the PandaAI char list, right?
iMac (2009), Mac OS X.8.1 - MacBookPro (2007), Mac OS X.8.2
@ YouTube
User avatar
Bradamante
 
Posts: 303
Joined: Tue Nov 25, 2008 10:58 am
Location: Leipzig, Germany

Postby NNair » Fri Aug 06, 2010 6:17 pm

Sure. I will make one in python and post it as soon as possible.

In the mean time, could you post a version of your crashed game with as much of the complexity/art removed so I can analyze the crash. Specifically if you can isolate the pursue from the rest of your code.

I personally am not too familiar with OSX and I really hope that it is not an OS issue.

The only documentation right now is on the download page :

http://www.etc.cmu.edu/projects/pandai/Download.html

which I guess you might have already seen.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby Bradamante » Fri Aug 06, 2010 6:45 pm

Well extracting the code will take forever, but maybe I'll do it.
I also noticed that the AI update() thread runs fine as long as there are no characters added.

The fish demo works, but it looks like the AI classes are instanced differently, more directly. I also tested the other 1.0 demos. The .dylib always crashes as soon as path finding starts. Now you can blame that on .csv errors, I had those before with different demos from people.

Static Obstacle Demo

Code: Select all
error opening navmesh.csv file!
Bus error


Dynamic Obstacle Demo

Code: Select all
error opening navmesh.csv file!
error opening navmesh.csv file!
error opening navmesh.csv file!
error opening navmesh.csv file!
couldnt find source
couldnt find destination
Bus error


Path finding Ralph

Code: Select all
error opening navmesh.csv file!
Segmentation fault
iMac (2009), Mac OS X.8.1 - MacBookPro (2007), Mac OS X.8.2
@ YouTube
User avatar
Bradamante
 
Posts: 303
Joined: Tue Nov 25, 2008 10:58 am
Location: Leipzig, Germany

Postby NNair » Fri Aug 06, 2010 6:57 pm

So correct me if I am mistaken but is there an inherent problem with csv and OSX ? Because those demos have tested before and they have worked on all the tests. Ofcourse, none were OSX tests though. Sorry about that.

The other errors would be consequences of that.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby Bradamante » Sat Aug 07, 2010 5:40 am

Bradamante wrote:Well extracting the code will take forever, but maybe I'll do it.


Well I just tried that and ... no. I had to extract and rewrite too much ... Position loop, target selection, spawn targets, player movement, fire functions etc.

The fish / hook game works. So what's different there? As I said, I think things are instanced differently, but ...

And again: does the character/node that is being followed have to be part of pandaai itself? Or can it just be a node?

EDIT:

rdb pointed me in the right direction. The whole navmesh.csv stuff works if I cd in the directory of the demo first. Then the dynamic and static demos suddenly work.

So what am I doing wrong? Usually I got Bus errors and that when I was using task incorrectly that are executed every frame.
iMac (2009), Mac OS X.8.1 - MacBookPro (2007), Mac OS X.8.2
@ YouTube
User avatar
Bradamante
 
Posts: 303
Joined: Tue Nov 25, 2008 10:58 am
Location: Leipzig, Germany

Postby NNair » Sat Aug 07, 2010 8:27 pm

So, I have created a simple pursue test and put it up at:

http://www.srinavinnair.com/downloads/P ... ueTest.zip

Please note:

Import of PandAi in this test is given as

from libpandaai import *

but has to be modified based on your version of OS and Panda3d. So for example in 1.7.0, it will be :

from panda3d.ai import *

.....................................................

If this works then it is definitely a bug in your game code, which will be harder to figure out unless you isolate the problem.

As for your other question, yes you can pursue a node path and it doesn't have to be linked to the AI. I have done this too in the sample I put up.

Hope this helps!
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby Bradamante » Sun Aug 08, 2010 4:55 pm

NNair wrote:As for your other question, yes you can pursue a node path and it doesn't have to be linked to the AI. I have done this too in the sample I put up.

Hope this helps!


Yes it does, thank you very much. The sample works. Say, the character that is steered by Panda AI ... can that be a nodepath (loader.loadModel) too? Because it is in my game, its not an Actor with animations 'n stuff.

EDIT: Ok, I just quickly tested that. Actor vs. model makes no difference.

I noticed that all samples add the task AIUpdate only when the first character enter the sim. I let the task run from the beginning, and when a pursuer spawns he's added to pandaai. Is that relevant?

I noticed that the mass attribute is not explained or I overlooked it.

What about collisions? The shot I create has a collision sphere. All the shots in the game immediately after creation register a collision with the ship they spawned from. Those are then checked if they come from the ship that fired it and in that case nothing happens. Works for all shots in the game, but maybe not here?

EDIT2: Wait a seond, I think I got it.

This one crashes:

Code: Select all
def addToAiEnv(self, model, sourceid):
      aiChar = AICharacter("test", model, 100.0, 0.25, 10.0)
      self.AIWorld.addAiChar(aiChar)
      aiBehaviors = aiChar.getAiBehaviors()
      sourcesTargetID = self.ShipObjects[sourceid].selectedTargetID
      aiBehaviors.pursue(self.ShipObjects[sourcesTargetID].ShipModel, 1.0)


But if I add a self. before aiChar, it works:

Code: Select all
def addToAiEnv(self, model, sourceid):
      self.aiChar = AICharacter("test", model, 100.0, 0.25, 10.0)
      self.AIWorld.addAiChar(self.aiChar)
      aiBehaviors = self.aiChar.getAiBehaviors()
      sourcesTargetID = self.ShipObjects[sourceid].selectedTargetID
      aiBehaviors.pursue(self.ShipObjects[sourcesTargetID].ShipModel, 1.0)


Somebody please explain that one to me?!

EDIT3:
When a nodepath is added to the PandaAI sim, the node gets a random heading,
could that be?
When I use aiBehaviors.removeAi("myname") Terminal says: invalid option! This should work ... I am using the same name that printList gives me.
How can I adjust how far a pursuer closes in on the target?
How do I adjust movement and turn speed? Yeah I know with those values mentioned above, but how exactly?

EDIT4:
Great, now the PandaAI lib crashes when I add a second character to the sim, i.e. fire a second guided missile. Those objects have unique names, so that can't be it.
iMac (2009), Mac OS X.8.1 - MacBookPro (2007), Mac OS X.8.2
@ YouTube
User avatar
Bradamante
 
Posts: 303
Joined: Tue Nov 25, 2008 10:58 am
Location: Leipzig, Germany

Postby NNair » Sun Aug 08, 2010 11:41 pm

Okay thats a lot of questions, so let me try and answer them one by one :

......................................................

1. PandaAI only cares about node paths. Actors or Models make no difference.

......................................................

2.
I noticed that all samples add the task AIUpdate only when the first character enter the sim. I let the task run from the beginning, and when a pursuer spawns he's added to pandaai. Is that relevant?


It doesn't matter when you create the AI character or set the behaviors. To test this out, in the sample I provided you,

cut this:

self.AIchar = AICharacter("ralph",self.ralph, 100, 0.05, 5)
self.AIworld.addAiChar(self.AIchar)
self.AIbehaviors = self.AIchar.getAiBehaviors()

and paste it in the setMove function before pursue. It should work fine.

......................................................

3.
But if I add a self. before aiChar, it works:


I am taking a guess here that this has to do with variables being local and so when the scope goes out, the object is destroyed.

......................................................

4.
When a nodepath is added to the PandaAI sim, the node gets a random heading,
could that be?


Definitely not. You can again test this in the sample provided by commenting out the pursue and doing step 2.

......................................................

5.
When I use aiBehaviors.removeAi("myname") Terminal says: invalid option! This should work ... I am using the same name that printList gives me.


Can you tell me which was the exact string you used and also note that if the AI has already been removed it will bug out. Could you test this out in the sample by using removeAI to remove the pursue and see if that works.

......................................................

6.
How can I adjust how far a pursuer closes in on the target?


If I understand what you mean, there isn't a way to do that inbuilt in PandAI but you could use an empty node path and place it a displacement away from your object and make it pursue that.

......................................................

7.
How do I adjust movement and turn speed? Yeah I know with those values mentioned above, but how exactly?


PandAI uses simple physics to move a body. So,,

v = u + at where a = F/m

But more practically, in the case of pursue,

3rd param - Increasing the mass slows it down
4th param - Increasing the movement force, increases the acceleration
5th param - This is the cap on the maximum speed.

Unfortunately, we didnt get enough time to set a turn speed parameter. Though I think it might be possible by using an empty node path.

......................................................

8.
Great, now the PandaAI lib crashes when I add a second character to the sim, i.e. fire a second guided missile. Those objects have unique names, so that can't be it.


Please check your code for mistakes in naming of the character, behavior etc... I have tested this out many times and it doesn't bug out on any of the tests.

If you are still not convinced, please test this out in the sample, by adding a new ralph character in the setMove function so that it is dynamically done.

......................................................

Hope these replies solve some of your problems.

Cheers.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby Bradamante » Mon Aug 09, 2010 5:18 am

NNair wrote:I am taking a guess here that this has to do with variables being local and so when the scope goes out, the object is destroyed.


Well, then what's the implications for my game? Maybe I should explain what I am doing ... In my space game I use PandaAI for guided missiles. A ship fires them, the rocket knows which ship in the system to pursue through it's ID. Close enough to the target the collision kicks in. That means that a ship can fire multiple guided missles at a time and multiple ships can fire multiple guided missiles.

Now maybe using PandaAI on this is overkill, but I don't want to implement my own system, where I store rockets in a dict, along with a timer system and a task that removes rockets when their timer runs out. Along with all that dot product stuff to figure out where a rocket has to turn and a position task to position the rockets.

Definitely not. You can again test this in the sample provided by commenting out the pursue and doing step 2.


Unfortunately, we didnt get enough time to set a turn speed parameter. Though I think it might be possible by using an empty node path.


Well I guess those are connected? My rockets need a turn parameter. Without it, the rocket spawns and immediately snaps in a heading to look at the target. The goal is that the rocket spawns like a car from a garage and then smoothly turns in onto the target.

Can you tell me which was the exact string you used and also note that if the AI has already been removed it will bug out. Could you test this out in the sample by using removeAI to remove the pursue and see if that works.


Yes I could. I used "guided3drocket" as a char name, later I tried something unique: str(id(nodepath)), i.e. "4356981942". Crashed on both.
Terminal says invalid option! on the remove and printList after that shows the entry is still there. Why is the removeAI option used on the AIBehaviors instead of the AIWorld? Weird. The PandaAI page does not state that by the way, that was trial and error.

But in case of the unique names that shouldnt matter. So I bet is has something to do with the self./scope problem described above. How can it crash on instancing classes? That's the way I spawn ships for example and it works of course.

Here's a crash report on a crash upon firing a second rocket using the unique id method: http://pastebin.com/JX6irqRG

If I understand what you mean, there isn't a way to do that inbuilt in PandAI but you could use an empty node path and place it a displacement away from your object and make it pursue that.


No. You already got a distance check somewhere, so make it adjustable please.

Please check your code for mistakes in naming of the character, behavior etc... I have tested this out many times and it doesn't bug out on any of the tests.

If you are still not convinced, please test this out in the sample, by adding a new ralph character in the setMove function so that it is dynamically done.


Well the sample with multiple Ralphs works here too, so no convincing needed.

Hope these replies solve some of your problems.


Thanks for your help.
iMac (2009), Mac OS X.8.1 - MacBookPro (2007), Mac OS X.8.2
@ YouTube
User avatar
Bradamante
 
Posts: 303
Joined: Tue Nov 25, 2008 10:58 am
Location: Leipzig, Germany

Postby NNair » Mon Aug 09, 2010 11:27 am

removeAI should take a parameter such as 'pursue', 'seek', 'all' etc. not the instance name.

It should be called like this:

aiBehaviorInstance.removeAI("pursue")


As for using PandAI for your missiles...well thats exactly what it was meant for...yet i feel since it was a first release it may not be as cuztomizable as your needs and so you will need to use hackier methods to get it to work the way you want. If I have some spare time, I will write a way to do that using empty nodepaths and post it up.

Sorry bout that.


Hmm I will try and make a simple shooter too for multiple guided missiles and hopefully you will be able to understand whats wrong from that soon.

Cheers.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby Bradamante » Tue Aug 10, 2010 11:28 am

NNair wrote:removeAI should take a parameter such as 'pursue', 'seek', 'all' etc. not the instance name.

It should be called like this:

aiBehaviorInstance.removeAI("pursue")


I don't get it. The download page says:

To remove any AI after their call has been instantiated.

void removeAi(string "AIName");

*Note for pathfinding removal, use pathfollow as the string name, since pathfinding is a subset of pathfollow.


What's removeAI to be used on? Not the World but Behaviors? Then lets say I add my missile to the world through:

Code: Select all
  aiWorld = AIWorld(render)
  aiChar = AICharacter("unique_id", NodePath, mass, mov_force, max_force)
  aiWorld.addAiChar(aiChar)
  aiBehaviors = aiChar.getAiBehaviors() 
  aiBehaviors.pursue(NodePath, 1.0)


Then the missile impacts, I remove the node that the AI is associated with ... then I want to remove the AI, since 2000 inactive AIs after some space battle sounds like something you should clean up. Then using removeAI("pursue") removes the behavior from the char, but not the char itself? How would I do that? removeAiChar()?
iMac (2009), Mac OS X.8.1 - MacBookPro (2007), Mac OS X.8.2
@ YouTube
User avatar
Bradamante
 
Posts: 303
Joined: Tue Nov 25, 2008 10:58 am
Location: Leipzig, Germany

Postby JohnKol » Tue Aug 10, 2010 1:44 pm

What's removeAI to be used on? Not the World but Behaviors? Then lets say I add my missile to the world through:


removeAI() is to be used only to remove a particular AI behavior from the AI character and not the character itself.

Then using removeAI("pursue") removes the behavior from the char, but not the char itself? How would I do that? removeAiChar()?


Like you mentioned, use removeAiChar(). This will remove that character from the AIWorld. Now all you need to do is clean up the nodepath.
John Kolencheryl

Project PandAI
Entertainment Technology Center
Carnegie Mellon
JohnKol
 
Posts: 35
Joined: Thu Aug 27, 2009 3:40 pm
Location: ETC, Carnegie Mellon University

wander strangeness

Postby ct » Tue Sep 28, 2010 11:04 pm

Incredible job to the PandaI team!

I've a question about AOE in pandai. I've implemented roaming ralph with pandai.

It looks like ralph runs off the roaming ralph map. I was wondering if you could help me out?

I'm using the following inputs to my wander call:

wander(2, 0, 3, 0.5)

2 = seek radius
0 = XY axis
3 = AOE
0.5 = priority

any help would be appreciated!

cheers,
ct
User avatar
ct
 
Posts: 6
Joined: Sat Mar 31, 2007 9:57 am
Location: D.C.

Postby SniZzo92 » Fri Oct 01, 2010 2:06 pm

Hello!
I think the linked version of PandAI navmesh gen tool for blender is that one setted with z-x and not x-y. The last one is linked on forum and solved my problems. Could someone change the link with the last updated version if I am effectively right? (I'm not completely sure about it)

let me know!
and thank you for your work! is very appreciated! :D
apathic.
User avatar
SniZzo92
 
Posts: 53
Joined: Thu Aug 14, 2008 10:25 am
Location: Udine, Italy

Postby NNair » Mon Oct 18, 2010 11:32 pm

Hey guys,

Sorry about the delay in reply but for some reason I wasn't receiving updates from the forum post.

Either ways,

@SniZzo92

Thanks.

Please refer to the download at:

http://www.srinavinnair.com/downloads/
*Note: use: from panda3d.ai import *

for now.

The reason why we haven't been able to update our original site is because it is affiliated with Carnegie Mellon and being graduates we have lost access and freedom to edit it.

In response to this, I am in the process of creating a much more detailed and easier version of the PandAI site so that there will be one common place to check for documentation, downloads, updates, tutorials and examples. I will post back when it is done.

@ct

Thanks.

AOE refers to Area of Effect and if i remember correctly should refer to the range/radius around which the character should wander.

Are you using wander in combination to the pathfinding in the roaming ralph tutorial ?

Try these values and let me know if it works :

wander(5,0, 30, 1.0)

Note: seek radius is a parameter of how wander is implemented. Experimenting with these values should give you a desired effect I hope.

Cheers.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby drwr » Tue Oct 19, 2010 1:52 am

In response to this, I am in the process of creating a much more detailed and easier version of the PandAI site so that there will be one common place to check for documentation, downloads, updates, tutorials and examples. I will post back when it is done.

Hey, very cool! Thanks!

David
drwr
 
Posts: 11253
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby Anon » Tue Oct 19, 2010 1:54 am

Since it is part of panda now... wouldn't it be best to put some of the documentation in the manual?
Anon
 
Posts: 1556
Joined: Thu Oct 29, 2009 3:07 am

Postby NNair » Tue Oct 19, 2010 3:05 am

Yes that is the final goal of this process. I would like to have everything here in the site ready and approved by a couple of people. Once it is fully updated it should be a trivial copy and paste into the manual.

For a glimpse at the current status of the new website here it is :

https://sites.google.com/site/etcpandai/

Any suggestions ?
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby NNair » Tue Oct 19, 2010 3:07 am

@David

Thanks.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Panda AI fixes and documentation

Postby Hodge1620 » Wed Dec 22, 2010 3:23 pm

A couple of thoughts on the current state of PandaAI and it's documentation...

(1) It would be helpful if we could set plane-limiting flags on all of the AI behaviors, not just "wander." For example, I was working with a flock of virtual chickens to make them pursue or evade the camera... When pursuing, they gently float off the ground plane and tilt upwards in pitch to orient toward the camera. Likewise, when evading, the direction "away" from the camera includes a downward pitch angle, causing the chickens to go subterranean. Oops. The only way I could find to fix this was to manually reset their Z and pitch every frame.

Perhaps this could be a flag on the AI character, and not on the particular behavior. E.g., regardless of whether it's seeking, flocking, wandering, path-finding, or evading... only adjust X,Y, and Heading.


(2) The documentation on "priority" and "weights" is confusing. Has the weight system changed since the original AI system was implemented? The documentation refers people to set an "int priority" attribute for each AI behavior and that this "int" should be a float between 0.0 and 1.0 (oops). The bigger problem is that a "priority" argument doesn't actually exist for any of the AI methods. The AI behaviors instead use argument like "flock_wt", "wander_weight", and "evade_wt". Calling "<AIchar>.flock( priority=0.9 )" will throw an error.

(3) The documentation on flocking similarly suggests weights for separation / cohesion / alignment in the range of 1 - 5 (e.g., separation=2, cohesion=4, alignment=5). In my testing, any value greater than 1.0 for these weights caused the character to go haywire, as if the forces were fighting each other. Values smaller than 1.0 basically negated the effectiveness of flocking. Is there a bug here?
Hodge1620
 
Posts: 28
Joined: Fri Oct 06, 2006 3:17 pm

Postby NNair » Sun Dec 26, 2010 3:44 am

@Hodge1620

Thanks for the comments.

(1) You are right. This was a feature we put in at the last minute since we were running out of development time. But say in a future release it would be a definite improvement.

(2) Priority is just a term we used to explain the concept. We used it interchangeably with weight. But thanks for pointing out the 'float'. I have fixed it in the new documentation.

(3) Flocking was another feature which we didn't get too much time on refining. In the new documentation, I have attached a new example which has a group flocking but there is some haywire turning movement in the beginning. I will check up with the developer who did this part of the code and see if he has an idea.

The new documentation is much more refined and has a lot of examples and sample code for each behavior so I hope this will solve a lot of the errors/confusions people seem to be having.

Thanks again for the support!
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby NNair » Sun Dec 26, 2010 5:29 am

I am proud to announce that the new documentation for PandAI is done !

https://sites.google.com/site/etcpandai/

I worked hard on making all the information as accessible as possible with links to videos and code for each behavior and path finding. It also contains a getting started page which I feel was much required.

Since, this thread is cluttered with a lot of old and even outdated information, I will start a new thread so that any comments related to this and PandAI from now on can be placed there.

Thanks again for all the support. Even though PandAI is but a basic AI library I hope that it has helped some developers to get AI in their games. If not maybe even helped them understand on how to write a basic AI library/any of the behaviors/path finding.
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby shimrod » Mon Jan 10, 2011 3:37 am

Where can I contact you to ask few questions?
shimrod
 
Posts: 280
Joined: Mon Dec 28, 2009 11:39 am

Postby NNair » Mon Jan 10, 2011 1:44 pm

Hey shimrod,

Well I think the best way to solve any queries about PandAI would be to post them here :

http://www.panda3d.org/forums/viewtopic.php?t=10550

We frequently check this and reply to user posts there.

If this doesn't work out as much, send me another post and I will send you my email.

Cheers
Srinavin Nair
PandAI,
Entertainment Technology Center,
Carnegie Mellon
NNair
 
Posts: 126
Joined: Thu Aug 27, 2009 3:38 pm
Location: ETC - Carnegie Mellon

Postby hesselKRaymond » Mon Feb 28, 2011 5:36 pm

Hi there,

I have got a problem with generating the *.cvs file for
PandaAI. I generated the mesh within Maya and followed the steps given in the video tutorials (http://www.panda3d.org/manual/index.php/Mesh_Generation) for the Mesh generation. Also I didn't forgot to triangulate both egg files before using them with the MeshGen. It always crashes as soon as I enter the command line for generating the cvs file.

I hope you guys can help me. I need this cvs-file pretty soon for a class that I am visiting.

Thanks Merlin

PS: Already tried it on two different PC's with Windows 7 Professional (x64 bit).

PPS: Here are some pictures of the egg files that I am working with:

Image

Image
hesselKRaymond
 
Posts: 3
Joined: Thu Feb 17, 2011 2:12 pm

PreviousNext

Return to Panda Features in Development

Who is online

Users browsing this forum: No registered users and 0 guests