Sample JOHN Programs


Map

A Map coloring problem: We define a Map object which has pieces, and we define a paint action that colors a particular piece with a given color. We then ask JOHN planner to color the entire Map in such a way that no neighboring pieces have the same color.

SAT

Implements Boolean Satisfiability Problem. The SAT problem is expressed in a Conjunctive Normal Form. This program is implements SAT solver as a planning problem, which is the reverse of what is common. Although it is not practical, this this program is a good way to learn about SAT problem and the DPLL? algorithm that solves it.

Maze

A robot in a maze with a goal square. We like to teach the robot how it can move about and then ask it to find the path to its goal square.

A simple heuristics of Manhattan Distance to the goal is defined for the robot to help its search for the goal.

Tetravex

Implements Tetravex game.

Chess

This program implements Chess in around 300 lines, including its ASCII-art graphics.

The program looks at all possible moves 2-3 moves ahead and then uses some heuristics to pick a good move.

Sorting

The meaning of sort is separated from multiple sort algorithms. We like to define optimizations that can dynamically decide which mixture of procedures are suitable to sort a particular list.

Nim

Implements Simple game of Nim.

Triples

implements the two player strategy game of Triples.

Poker hands

implements a dealer and two players. 5 card poker hands are dealt to the players and the machine can tell which hand is a better one.

Fibonacci

Demonstrates use of Goal Optimizations in satisfying a goal of finding the first N fib numbers.

Register Allocation

Model of optimal register allocation of programs in SSA form.

 
Page last modified on February 26, 2009, at 07:41 PM

simplaPoweredBy

 

Warning: fopen(wiki.d/.flock) [function.fopen]: failed to open stream: Permission denied in /home/hesam/public_html/pmwiki/pmwiki.php on line 417

PmWiki can't process your request

Cannot acquire lockfile

We are sorry for any inconvenience.