In this chapter we show you how hunter.jactr
works.
Let's start by opening the 00-EmptyBot example project bundled in the Pogamut plugin for Netbeans.
Follow these steps:
Open Netbeans (
→ → → )Once Netbeans were loaded open example project:
→ → → → then clickIn New Project dialog enter name of the
folder where the example will be unpacked, for example
02-HunterBot
, after you are finished click
button.
Now a project named "02-HunterBot" will be opened in the Projects tab, open project's Source Packages sub folder and then the cz.cuni.amis.pogamut.ut2004.examples.pojactr package contained in this folder.
Finally double click hunter.jact
file
containing source code of our first bot.
Notice that the project's node in Projects tab is in bold, this means that the (F6) and (Ctrl + F5) buttons are linked to this project. Before we will start this first bot we have to launch the Unreal Tournament dedicated server - an environment simulator that the bot will connect to. We suppose you read 00-EmptyBot tutorial, so you know how to run and inspect Pogamut bot.
Hunter defines some jACT-R modules/buffers and all PoJACT-R modules/buffers. jACT-R modules are:
Declarative module: required for declarative memory
Procedural module: required for production and procedural memory
Goal module: module that holds current intention of Hunter
PoJACT-R modules are:
Aural module: perceptual module that process aural perceptions and offers it via aural buffer for production
Visual module: perceptual module that process visual perceptions and offers it via two buffers: visual location buffers for nav points and visual object buffer for items and agents
Location module: perceptual module that via location buffer offers actual position of agent
Self module: perceptual module that offers information about agent (i.e. hit points)
Body command module: motor module with two buffers: movement command buffer for spatial moving and body command buffer for other motor actions like shooting.
Control command module: technical module for administration
Hunter bot was implemented as simple working agent for presenting PoJACT-R. Hunter has very simple behaviour: Hunter randomly run around the map. After he spots the enemy he start chasing him and shooting. He starts chasing if enemy is killed or enemy manage to runs away or hunter is killed.