Pogamut 2 Platform for fast development of cognitive agents inside 3D environment Creating JavaSPOSH bot project + pitfalls (S)POSH Reimplementing bots.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

Lecture 14 User-defined functions Function: concept, syntax, and examples © 2007 Daniel Valentine. All rights reserved. Published by Elsevier.
Recursion vs. Iteration The original Lisp language was truly a functional language: –Everything was expressed as functions –No local variables –No iteration.
CIT 590 Intro to Programming Java lecture 3. Hashmaps The equivalent of python dictionaries. With both ArrayLists and Hashmaps, the syntax only allows.
Lab#1 (14/3/1431h) Introduction To java programming cs425
MT311 Tutorial Li Tak Sing( 李德成 ). Uploading your work You need to upload your work for tutorials and assignments at the following site:
Modules and Objects Introduction to Computing Science and Programming I.
1 Ant – Another Neat Tool Representation and Management of Data on the Internet.
18 June 2010 Upgrading Your Geant4 Release J. Perl 1 Upgrading Your Geant4 Release Joseph Perl, SLAC.
6 November 2009 Upgrading Your Geant4 Release J. Perl 1 Upgrading Your Geant4 Release Joseph Perl, SLAC Geant4 v9.2p02.
14 January 2011 Upgrading Your Geant4 Release J. Perl 1 Upgrading Your Geant4 Release Joseph Perl, SLAC.
Group practice in problem design and problem solving
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Using a Simple Python Script to Download Data Rob Letzler Goldman School of Public Policy July 2005.
1 Operating Systems Lecture 3 Shell Scripts. 2 Shell Programming 1.Shell scripts must be marked as executable: chmod a+x myScript 2. Use # to start a.
Introduction to Python
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Lecture 16 Page 1 CS 236 Online SQL Injection Attacks Many web servers have backing databases –Much of their information stored in a database Web pages.
COMPSCI 101 Principles of Programming Lecture 28 – Docstrings & Doctests.
Configuration Management (CM)
CSCI-383 Object-Oriented Programming & Design Lecture 13.
School of Computer Science & Information Technology G6DICP - Lecture 9 Software Development Techniques.
1 Wright State University, College of Engineering Dr. T. Doom, Computer Science & Engineering CS 241 Computer Programming II CS 241 – Computer Programming.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
Oracle Data Integrator Procedures, Advanced Workflows.
MD – Object Model Domain eSales Checker Presentation Régis Elling 26 th October 2005.
Roles of Variables with Examples in Python ® © 2014 Project Lead The Way, Inc.Computer Science and Software Engineering.
30/10/ Iteration Loops Do While (condition is true) … Loop.
COP-3330: Object Oriented Programming Flow Control May 16, 2012 Eng. Hector M Lugo-Cordero, MS.
Installing CompuCell3D from source. Why you might want to install from source? 1.There are no binaries for your platform (e.g. gentoo linux) 2.You want.
(1) Unit Testing and Test Planning CS2110: SW Development Methods These slides design for use in lab. They supplement more complete slides used in lecture.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
Compsci 6/101, Spring More on Python, Tools, Compsci 101 l APTs, Assignments, Tools  APT: Algorithmic Problem-solving and Testing  How to get.
Variables, Primitives, and Objects A Visual Learner’s Guide.
Pogamut 2 Platform for fast development of cognitive agents inside 3D environment UT2004 items and Pogamut API Raycasting Let’s talk about raycasting :-)
Cross Language Clone Analysis Team 2 October 13, 2010.
©Colin Jamison 2004 Shell scripting in Linux Colin Jamison.
CPS120 Introduction to Computer Science Iteration (Looping)
Files Tutor: You will need ….
Introduction to Python Dr. José M. Reyes Álamo. 2 Three Rules of Programming Rule 1: Think before you program Rule 2: A program is a human-readable set.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Pogamut 2 Platform for fast development of cognitive agents inside 3D environment Creating javabot project / pitfalls Startup/running/shutdown sequence.
1 b Boolean expressions b truth tables b conditional operator b switch statement b repetition statements: whilewhile do/whiledo/while forfor Lecture 3.
Using Sequential Containers Lecture 8 Hartmut Kaiser
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
(c) University of Washington10-1 CSC 143 Java Errors and Exceptions Reading: Ch. 15.
Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 5 th October 2015 Workshop 1 – Java Wrestling.
Programming in Java (COP 2250) Lecture 12 & 13 Chengyong Yang Fall, 2005.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
Pogamut 2 Platform for fast development of cognitive agents inside 3D environment AIN / INV messages refined, pitfalls Bot skill GunTestBot Faculty of.
Introduction to Exceptions in Java CS201, SW Development Methods.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Introduction to Python
Selection (also known as Branching) Jumail Bin Taliba by
Discussion 2: More to discuss
Variables, Expressions, and IO
Sentinel logic, flags, break Taken from notes by Dr. Neil Moore
Conditions and Ifs BIS1523 – Lecture 8.
Sentinel logic, flags, break Taken from notes by Dr. Neil Moore
Teaching London Computing
Java Programming Arrays
Coding Concepts (Basics)
Sridhar Narayan Java Basics Sridhar Narayan
Building Java Programs
Object Comparisons and Arrays
CSC 143 Java Errors and Exceptions.
Good programming practices
Presentation transcript:

Pogamut 2 Platform for fast development of cognitive agents inside 3D environment Creating JavaSPOSH bot project + pitfalls (S)POSH Reimplementing bots with SPOSH Faculty of mathematics and physics Charles University at Prague 16 th April

JavaSPOSH bot project Select correct project type and read the description !

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 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 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

JavaSPOSH bot project – Pitfall 2 1) Even though BUILD is SUCCESSFUL 2) Bot failed to run 3) Python engine has tried to interpret \abc as a character and broken the path to the planfile

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

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 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”

JavaSPOSH bot project – Bot is running Congratulations!

POSH parallel ordered slip-stack hierarchy  Dr. J. J. Bryson, University of Bath, UK   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

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

POSH parallel ordered slip-stack hierarchy

POSH Syntax for HC people :-)

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.

Java SPOSH bot project Implementing actions / senses  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 Implemented inside MyBehavior.java Java Reflection API is used. File MyBehavior.java

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… 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: 1)SPOSH engine first schedules some action / action pattern to be executed 2)Then it executes all scheduled actions (e.g. action pattern will schedule more then one action)

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!