creating javasposh bot project pitfalls s posh reimplementing bots with sposh l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Pogamut 2 Platform for fast development of cognitive agents inside 3D environment PowerPoint Presentation
Download Presentation
Pogamut 2 Platform for fast development of cognitive agents inside 3D environment

Loading in 2 Seconds...

play fullscreen
1 / 19

Pogamut 2 Platform for fast development of cognitive agents inside 3D environment - PowerPoint PPT Presentation


  • 378 Views
  • Uploaded on

Creating JavaSPOSH bot project + pitfalls (S)POSH Reimplementing bots with SPOSH Faculty of mathematics and physics Charles University at Prague 16 th April 2008 Pogamut 2 Platform for fast development of cognitive agents inside 3D environment http://artemis.ms.mff.cuni.cz/pogamut

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Pogamut 2 Platform for fast development of cognitive agents inside 3D environment' - niveditha


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
creating javasposh bot project pitfalls s posh reimplementing bots with sposh
Creating JavaSPOSH bot project + pitfalls

(S)POSH

Reimplementing bots with SPOSH

Faculty of mathematics and physics

Charles University at Prague

16th April 2008

Pogamut 2Platform for fast development of cognitive agents inside 3D environment

http://artemis.ms.mff.cuni.cz/pogamut

javasposh bot project
JavaSPOSH bot project

Select correct project type and read the description!

http://artemis.ms.mff.cuni.cz/pogamut

javasposh bot project3
JavaSPOSH bot project

Freshly created project is containing:

  • Main.java – main class that fires up the bot, containing path to the sposhPlan.lap (need to be configured! – next slide…)
  • MyBehavior.java – descendant of Behavior, containing actions and senses (implementations done here)
  • sposhPlan.lap – file containing SPOSH plan (decision tree of the agent)
running empty javasposh bot
Running empty JavaSPOSH bot

Not as easy as with JavaBot project.

1) we’re still have some nasty problem with build.xml (Ant script file firing the agent up), may be already corrected…

2) some project names gives the Python engine a headache

3) you have to correctly specified the path to the sposhPlan.lap file (for SPOSH-engine)

javasposh bot project pitfall 1
JavaSPOSH bot project – Pitfall 1

3) We’re still have some

troubles with build.xml file…

4) Take build.xml file from any

Java Bot project (replace

JavaSPOSH one with it).

2) No bot is running…

1) Even though BUILD is SUCCESSFUL

http://artemis.ms.mff.cuni.cz/pogamut

javasposh bot project pitfall 2
JavaSPOSH bot project – Pitfall 2

2) Bot failed to run

3) Python engine has tried to interpret \abc as a character and broken the path to the planfile

1) Even though BUILD is SUCCESSFUL

http://artemis.ms.mff.cuni.cz/pogamut

javasposh bot project pitfall 2 solution
JavaSPOSH bot project – Pitfall 2 solution

DO NOT create projects with names that begin with a, b, c, d, e, f … otherwise the Python engine will interpret \abcYourName as ‘\abc’YourName converting \abc to a wrong character and breaking the path.

Project name ABC is WRONG

Project name JavaSPOSHTest is OK

http://artemis.ms.mff.cuni.cz/pogamut

javasposh bot project pitfall 3
JavaSPOSH bot project – Pitfall 3

3) Because it couldn’t find the sposhPlan.lap file

2) Bot has failed to run…

1) Even though BUILD is SUCCESSFUL

javasposh bot project pitfall 3 solution
JavaSPOSH bot project – Pitfall 3solution

Step-by-step:

1) open Main.java file and find getPlanFile() method

2) change “PROJECT_NAME” and “package_name”

in this case to

“JavaSPOSHExample” and “javasposhexample”

posh parallel ordered slip stack hierarchy
POSH parallel ordered slip-stack hierarchy
  • Dr. J. J. Bryson, University of Bath, UK
  • http://www.cs.bath.ac.uk/~jjb/web/posh.html
  • reactive planner
    • not fully reactive, you may store whatever variable in your Behavior
  • SPOSH – Strict POSH
    • more or less a decision tree with slip-stack
  • working with Behavior class that is containing

actions and senses

http://artemis.ms.mff.cuni.cz/pogamut

posh parallel ordered slip stack hierarchy12
POSH parallel ordered slip-stack hierarchy
  • Agent has:
    • goal to fulfill
      • we’re running endlessly so the goal is “fail”
    • ordereddrives
      • evaluated each POSH-engine iteration
    • competences
    • action patterns
  • Using (defined in Behavior):
    • senses – gives information from the environment
    • actions – primitives

http://artemis.ms.mff.cuni.cz/pogamut

posh parallel ordered slip stack hierarchy13
POSH parallel ordered slip-stack hierarchy

http://artemis.ms.mff.cuni.cz/pogamut

posh syntax for hc people
POSH Syntax for HC people :-)

http://artemis.ms.mff.cuni.cz/pogamut

posh parallel ordered slip stack hierarchy15
POSH parallel ordered slip-stack hierarchy

Notice the corespondency between action / sense names in plan file and names of the methods in java source code.

http://artemis.ms.mff.cuni.cz/pogamut

java sposh bot project implementing actions senses
Java SPOSH bot project Implementing actions / senses

Implemented inside MyBehavior.java

Java Reflection API is used.

File MyBehavior.java

  • every action has prefix ‘action_’
  • every sense has prefix ‘sense_’
  • both are always without parameters, both HAS

to return a boolean (success)

  • memory and body accessible through bot.getMemory()

and bot.getBody() inside MyBehavior.java

java sposh bot project when the bot fails to run
Java SPOSH bot project When the bot fails to run…

1) Bot builds ok

2) But fails to run

3) Examine Platform Log

4) Look for SEVERE entry with ‘Can’t instantiate SPOSH agent’

5) Read the reason

… here, we’ve got error in plan syntax

java sposh bot project how to test how it works
Java SPOSH bot project How to test, how it works…

Download the JavaSPOSHExample bot from the webpage.

Where is the trick? Every action / sense that is firing is logging into User log that it fires. You’re free to examine how the SPOSH engine works

Some hints:

SPOSH engine first schedules some action / action pattern to be executed

Then it executes all scheduled actions (e.g. action pattern will schedule more then one action)

java sposh bot project remember followbot
Java SPOSH bot project Remember FollowBot?

Now the time has come! To become The One…

Do you remember FollowBot from the second lecture? Good! Go and implement it using JavaSPOSH bot project.

Good luck!