Code Monkey home page Code Monkey logo

cbts-checker's Introduction

Conditional Behavior Tree Checker

Given a Conditional Behavior Tree (CBT) this program is able to check its executability... if it is valid or not.

References:

  • Conditional Behavior Trees: Definition, Executability, and Applications. E. Giunchiglia, M. Colledanchise, L. Natale and A. Tacchella. IEEE International Conference on Systems, Man and Cybernetics 2019. PDF
  • Computing the Initial Requirements in Conditioned Behavior Trees. E. Giunchiglia. 6th International Workshop on Engineering Multi-Agent Systems (EMAS 2018) PDF

Installation

Requirements

Compile

You will need the gcc compiler (with c++11 support) installed on your computer. In order to check if you have gcc installed on your machine you can issue the command: gcc --version

If the message command not found appears that it means that gcc is not installed on your machine.

External Program

In order to check the satisfiability of the propositional logic encoding, the external program limboole is needed. Follow next steps to download and compile it:

  1. limboole requires PicoSAT as backend. If you do not have it on yuor machine, follow the steps below:

    • dowload the file "picosat-965.tar.gz" that you can find at the link http://fmv.jku.at/picosat
    • decompress the downloaded file
    • rename the folder "picosat-965" to "picosat"
    • in the picosat folder execute ./configure.sh && make.
  2. Once you have PicoSAT, it is time to compile limboole:

    • go to the link http://fmv.jku.at/limboole
    • dowload the file "limboole1.1.tar.gz"
    • decompress the dowloaded file in the same folder in which the picosat folder is placed
    • in the decompressed folder (limboole1.1) execute the command ./configure.sh && make.

Compile

CMake is used to build the application.

Testing

For the testing phase the framework catch2 (https://github.com/catchorg/Catch2) was deployed.

The test created binary application must be executed from the root directory as it looks for files inside "test" directory. that is: .../cbt_checker$ ./bin/test

How to use it

Call cbt_checker created applicaiton in "/bin" with the following parameters:

  • configuration file: a file where "limboole path" is stored
  • tree: a xml file representing the tree
  • initial state: a txt file with input requirements
  • temporary directory: directory where internal files are stored
  • output directory: directory where output files are stored

First three parameters are inputs while last one is where the program generates the follwoing file:

  • cbt_valid.txt: writes as YES/NO the result of validating the CBT.

In the temporary directory the validator generates following internal files:

  • cbt_plans.txt: in this file the propositional logic representation of the CBT is written.
  • solver_results.txt: the first line of this file declares if the representation contained in cbt_plans.txt is satisfiable or not.

cbts-checker's People

Contributors

dgerod avatar egiunchiglia avatar

Watchers

 avatar

cbts-checker's Issues

Add bindings for python

To be able to use this code in python, we should create a module that calls the application built in C++. In addition, we should create an python script that uses this python module to make the application easy to use.

Avoid that conditions in initial state must end by "_0"

At this moment it is necessary that conditions in the initial state finish by the "_0". That is: in_place_0 & NOT closed_0, when this should be in_place & NOT closed.

Finishing by "0" is a requirement of the algorithm that validates the CBT but not a user requirement. Therefore, this prefix should be added by the software after receiving the initial state instead asking the user to add conditions with that suffix.

Fix XML used in tree files

The load of the XML is ad-hoc instead using an existing library, so the are a lot of cases that are not well done. Therefore, the code should be fixed.

There are two options:

  • Use an existing light XML library to load the file.
  • Replace the format but something more simple as it seems too much to use XML

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.