项目作者: marcmelis

项目描述 :
Propositional Logic Agents with the JADE platform and SAT4J
高级语言: Java
项目地址: git://github.com/marcmelis/barcenas-world.git
创建时间: 2018-04-17T09:56:23Z
项目社区:https://github.com/marcmelis/barcenas-world

开源协议:

下载


barcenas_world

Propositional Logic Agents with the JADE platform and SAT4J. \
You can find a copy of this repository at https://github.com/markankaro/barcenas-world. \
The goal of this practice is to modelize a problem with Propositional Logic and implement it.

Requirements

Usage

  1. $ java jade.Boot -agents 'BarcenasWorld:BarcenasWorldEnv(<worldDimension>,<barcenas_x>,<barcenas_y>,<mariano_x>,<mariano_y>);Finder:BarcenasFinder(BarcenasWorld,<worldDimension>,<stepsfile.txt>)'

Where:

  • worldDimension: lenght of one side of the square map
  • barcenas_x, barcenas_y: position of Barcenas
  • mariano_x, mariano_y: position of Mariano
  • stepsfile.txt: route of the steps file

Barcenas and Mariano are in a map of worldDimension x worldDimension. The goal of the problem is to find Barcenas. Barcenas smells at his position and in the adjacent ones in a cross. Our Agent moves around the map trying to find Barcenas. Our Agent can smell Barcenas if he is in Barcenas range of smell. Our Agent can meet with Mariano if he steps in the same position of the map. Mariano will tell to our Agent if Barcenas is at his right or at his left (If it is in the same column he will say right).

stepsfile.txt

stepsfile.txtis a flat text document with the steps our agent will do with the following format.

  1. x1,y1 x2,y2 ... xl,yl

Being l = worldDimension .
Our Agent will just do the steps of the file by order. The steps don’t need to be adjacent, you can jump from position to position.

Example

Execute the following commands if you have the right $CLASSPATH with both Jade and SAT4J .jar.

Create the list of steps.

  1. $ echo "1,1 1,2 2,2 2,3 3,3 4,3 4,4 4,5 5,5" > steps.txt

Execute the agents.

  1. $ java jade.Boot -agents 'BarcenasWorld:BarcenasWorldEnv(6,4,4,2,2);Finder:BarcenasFinder(BarcenasWorld,6,steps.txt)'

At 2,2 the finder agent should meet with Mariano and discard the first column as he says that barcenas is at his right.
The program should stop by the 4,4 step where the finder has enough evidence that Barcenas is in 4,4.

Authors