Topic: AI

Hey, anybody care to explain how to make a simple AI system?

Re: AI

How simple are you looking for?
in my game "very stupid" ai  is just randomly moving
(im still doing that ai...but im doing other stuff atm)

I done the moving like this:
i got randomNumber
if its below 7 : rotate to one direction
if its below 10 (7-10) move straight
else move and rotate same time.
if player is in vision reduce health of player (but will add more in this part, like shoot, aim etc)

well it is very stupid ai, havent done yet detection of walls, will do better when got time.

Re: AI

Hey Pär,

AI is simply a way to apply realistic behaviors to objects in a convenient and automatic fashion.

Examples of AI are Maratis "Behaviors", brick-logic, path following, path finding, enemy behaviors (moving toward you, fighting....), animals that flee when you approach them...

Eplanatory examples can be found at http://www.etc.cmu.edu/projects/pandai/aitypes.html

Most of these behaviors involve multiple objects to interact between themselves, initiating a cascade of action-reaction chain (if A do this then B do that and then A reacts to B...)

The advantage of using AI is that you code the behavior once (ideally as a C++ plugin accessible in the Behavior panel in Maratis) and then you only have to set target objects in the editor and they will behave as expected.

So to make an AI system, the first step is to choose your desired behaviors,  write down the detailed chain of action-reaction and then start to code each of them!

From the dev roadmap, additional behaviors are planned (simple AI, ready-made player moving (3rd person, platform...)).
Hope to see them in a very near future as this kind of feature bring both infinite power and ease of use to the user.

Last edited by com3D (2013-04-28 17:46:00)

Re: AI

Does anyone have first hand experience with RAICK (Ragnarok Artificial Intelligence Creation Kit) ?

Re: AI

Pär wrote:

Hey, anybody care to explain how to make a simple AI system?

Yep smile
As com3d and pleedian have mentioned, the question is a bit vague. Following what pleedian mentioned, you can easily make fish AI.

For most* other AI  you will probably want pathfinding as a basis. You can find many great tutorials online about how to implement pathfinding (one picked at random). Once you can tell an object "go to X" and it finds its way without getting stuck on walls, then the fun begins.

Unfortunately there's no pathfinding support in Maratis yet. There's a great library which would add pretty much everything we could possibly need if we could get it integrated. Unfortunately I haven't got the time to do so right now. Maybe someone else might want to make a plugin? *hint hint*

com3D wrote:

Does anyone have first hand experience with RAICK (Ragnarok Artificial Intelligence Creation Kit) ?

Never heard of it, but I just looked it up. Looks pretty awesome, but it is pretty much a (nicer) wrapper around the existing AI functionality, so I don't think that we can (easily) just copy/paste their lua scripts into Maratis. On the other hand, it's BSD, so there's absolutely nothing wrong with anyone looking and getting "inspired" by their stuff for within Maratis.

Pär wrote:

Hey, anybody care to explain how to make a simple AI system?

quoted again because I'm getting back to the original question
State machines. Research. Learn. Love. Writing a state machine is incredibly easy. Maintaining it as it grows unfortunately is less so. Ideally, I'd like to be able to add a variable type to a behavior which opens up a custom window for manipulating the state machine associated with that behavior (I already have a prototype tool written in a 2D engine... (actually, that gives me a GREAT idea... I might run and do some testing on it in a bit))

Anyway, those are my thoughts on the situation smile I hope they were at least a little coherent smile

*Of course you could have basic AI that just moves in a straight line between waypoints which wouldn't need pathfinding, chess AI wouldn't need pathfinding, etc etc etc

Re: AI

Pär wrote:

Hey, anybody care to explain how to make a simple AI system?

I posted an example on a previous post of yours:
http://forum.maratis3d.com/viewtopic.php?id=500

I will be working on the actual code for an AI system like this once I find out a good workflow for importing objects with animations into Maratis.

I can't get Blender and Sketchup to work with me quite yet.

Re: AI

Did you try importing in collada (dae) format?

Re: AI

com3D wrote:

Did you try importing in collada (dae) format?

Yes, I was able to get the .DAE into Maratis with textures intact by importing to Blender and exporting to a Maratis MESH file using the Blender plugin. I was also able to bake shadows to the object in blender and get it into Maratis (That's a plus.)

I am having rigging trouble in Blender right now though.

Thanks.