Whats the most complex AI you ever did?
My soldier down enemies didn’t have very good walking ai. Before you disturbed them, they basically patrolled around in circles. But, if they SAW you (a ray in front of them) or HEARD you (if you fire your gun they hear it and start tracking to where you shot) then they go into follow mode. They don’t shoot until they can see you, and if you’re hiding behind a tree they can navigate around the tree to get to you. I think that’s the best I’ve done. Gotta love those track tos though, they make simple ai really easy:)
Pretty cool! Have you done it fully with Logic Bricks or did you use some python-scripting to achieve that?
Hehe, almost all python. I use logic bricks for radar and ray sensors, but everything else is a script.
as a test when the message things were first introduced i made a couple of characters (well, one and an alt-D ), and then made them sword fight. nothing fancy, just a couple of attack animations and a couple of blocks. when one attacked, it sent a message saying which attack it was doing and the other blocked using the correct blocking move
not exactly AI, but it looked pretty cool, as they moved towards each other and moved around
also did something so if you got close to someone they could hear you, but would only come towards you if they actually saw you
Seems that I should practice a lot more python…
python offers little logic bricks don’t, seeing as you still have to use the logic bricks to obtainn the senses anyway. learning python won’t improve your AI methods. Im afraid your stuck with random actuator and track to. maybe some IPO stuff but essentially they are how its done.
I disagree with that. AI is surely a large field but Blender brings some useful features that can be improved with python.
I think ray, radar and near sensors or the messaging system are fully sufficient as sense for a basic AI - so it depends on the logic wanted. Tracking objects or passing more information from an objoect to another through messages is also possible. And it should be possible to implement a simple state machine only with logic bricks. There are many other useful things - eg. the timer property. It should be better with python.
The random actuator and sensor could be used to add some imperfection and variation. The only thing IPOs could be used in my opinion seems for “entertaining” an object in an inactive state. So I believe that these basic features can be extremly improved with python and since I am a lousy python coder the best should be I practice some python.
how are you diagreeing? all i said was that python offered little that logic bricks alone don’t.
how you use them is up to you
Sorry, I’ve misunderstood you. :-?
Python can do some things that are totaly impossible with logic bricks. Such as allow low level access to an object’s mesh (vertices, UV coordinates, etc.) Python can also do other things, like align an object with the hit face normal from a ray sensor, or return the actual velocity of a moving object. These things can’t currently be done with logic bricks alone.
and again they help very little with AI.
actually they do. (Pathfinding)
Sophistocated logic methods, while POSSIBLE to do with logic bricks, can become not really feasable to do with logic bricks. It depends on how advanced the ai is, but if you want to do more advanced ai, such as neural networks, genetic algorithms, pathfinding, or fuzzy logic, most of these can’t really be done without python. Sometimes you need the ai to do more than track to, say, deciding which enemy to attack, or which path would provide the best tactical advantage. Using python you can tackle issues such as these much quicker and better than you ever could with logic bricks.
While logic bricks are great, and they provide you with some really useful basic sensors (that you still might use WITH python) python affords you so much more.