FSM/SLN AI Demo

BlitzMax Forums/BlitzMax Programming/FSM/SLN AI Demo

ninjarat(Posted 2007) [#1]
Hey, check this out! I've got a BlitzMax AI demo available for download: http://rattuscanisdev.g0dsoft.com/modules/wmpdownloads/

I've tried to document this as best I could, but I'm working on doing more, in case it's not enough.

In this case I've combined a Synchronous Logic Network with a Finite State Machine. The Analyzer Unit examines the current situation and flags the beneficial behavioral options. Then the SLN Unit makes a decision as to what the Finite Behavior State should be. FSM then applies the proper behavior algorithm to the entity and handles special behavior transition states. Last is the Render Unit, which draws everything. Repeat.

I hope you can learn something about AI programming from it! ;)

EDIT: Oh yeah, it's called Bugz, and the concept is strongly based on a Blitz Coders example. This is where I got the idea of using a SLN to beef up that Blitz Plus example as well. Download the latest version which as of now is V2.


LAB[au](Posted 2007) [#2]
Very cool, I like it. Perhaps you could remove references to " rat.FramesPerSecond " and include its contents in the source code...


ninjarat(Posted 2007) [#3]
Oh! That reminds me! I'm gonna put my module set available for download on the site.


ninjarat(Posted 2007) [#4]
Okay, the modules are up there. Download / extract in to the mod directory to install. Rebuild them if you are using Linux or MacOS. Then compile the Bugz source. Should work fine.


LAB[au](Posted 2007) [#5]
I had to add this to compile it:

Import BRL.event
Import BRL.eventqueue

But now it works ;)


ninjarat(Posted 2007) [#6]
Oh. Weird. Anyway, I'm creating an AI class that can be used universally, since you can actually use custom Logic, Transition, and Update callbacks. That should be on my site pretty soon.