Jadex 0.96

jadex.examples.puzzle.mobile
Agent Benchmark


agent Benchmark

Puzzling benchmark agent.

This agent that plays a board game for one player. This example is a Jadex adaption of the original JACK(TM) puzzle example and was used for performance comparisons between both platforms (cf. readme.txt). This version uses mobile plans and therefore incurs no overhead for thread switching (slightly faster than the standard version used for the benchmarks).


Belief Summary
belief IBoard board
           The game board offers possibilities to make moves, take back moves and keep track of the game history.
belief String ml
           The meta-level strategy for choosing moves (none=choose the first applicable, long=prefer jump moves, same_long=prefer long moves of same color, alter_long=prefer long move of alternate color.
belief long move_delay
           The delay in milliseconds between two moves.
belief int triescnt
           The number of moves already tried.
 
Goal Summary
metagoal choosemove(ICandidateInfo [set] applicables, ICandidateInfo [set] result)
           The meta-level goal for choosing between plans for the makemove goal.
achievegoal makemove(int depth)
           The goal to make a move on the board that is the solution.
 
Plan Summary
mobile plan choose_move_plan(ICandidateInfo [set] applicables, ICandidateInfo [set] result)
           Meta-level plan used to choose among the possible move plans.
mobile plan move_plan(int depth, Move move)
           Make a move on the board and create a subgoal for the next move.
mobile plan play_game_plan()
           Start puzzling on the board and measure the needed time.
 
Configuration Summary
default configuration  alter-long
          
configuration  long
          
configuration  none
          
configuration  same-long
          
 

Belief Detail

board

belief IBoard board
The game board offers possibilities to make moves, take back moves and keep track of the game history.

Default fact:
new JackBoard()

triescnt

belief int triescnt
The number of moves already tried.

Default fact:
0

move_delay

belief long move_delay
The delay in milliseconds between two moves.

Default fact:
0

ml

belief String ml
The meta-level strategy for choosing moves (none=choose the first applicable, long=prefer jump moves, same_long=prefer long moves of same color, alter_long=prefer long move of alternate color.

Default fact:
"alter_long"
Goal Detail

makemove

achievegoal makemove(int depth)
The goal to make a move on the board that is the solution.

Parameters:
in parameter depth Default value:  0
BDI flags:
retry: true
retry delay: 0
exclude: when_tried
random selection: false
post to all: false

choosemove

metagoal choosemove(ICandidateInfo [set] applicables, 
                    ICandidateInfo [set] result)
The meta-level goal for choosing between plans for the makemove goal.

Parameters:
in parameterset applicables
out parameterset result
BDI flags:
retry: true
retry delay: 0
exclude: when_tried
random selection: false
post to all: false
Goal trigger:
Goal trigger:
makemove
Plan Detail

play_game_plan

mobile plan play_game_plan()
Start puzzling on the board and measure the needed time.

Plan body:

move_plan

mobile plan move_plan(int depth, 
                     Move move)
Make a move on the board and create a subgoal for the next move.

Parameters:
in parameter depth Default value:  0
 (goal mappings: makemove.depth)
in parameter move Binding options:  $beliefbase.board.getPossibleMoves()
Plan body:
Plan trigger:
Goals:
makemove

choose_move_plan

mobile plan choose_move_plan(ICandidateInfo [set] applicables, 
                            ICandidateInfo [set] result)
Meta-level plan used to choose among the possible move plans.

Parameters:
in parameterset applicables (goal mappings: choosemove.applicables)
in parameterset result (goal mappings: choosemove.result)
Plan body:
Plan trigger:
Goals:
choosemove
Configuration Detail

none

configuration none
Initial Beliefs:
ml Initial value:  "none"
Initial Plans:
play_game_plan

long

configuration long
Initial Beliefs:
ml Initial value:  "long"
Initial Plans:
play_game_plan

same-long

configuration same-long
Initial Beliefs:
ml Initial value:  "same_long"
Initial Plans:
play_game_plan

alter-long

default configuration alter-long
Initial Beliefs:
ml Initial value:  "alter_long"
Initial Plans:
play_game_plan

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.