What facts does <tt>act</tt> need?


next up previous
Next: Testing act
Up: The game of Traveller (PP)
Previous: Running a trader
Back: to main list of student notes

What facts does act need?

You can demonstrate this in the following way. Do

This loads a simple version of act, driving a trader named circler. To look at its definition, you can do showlib circler.pl. There is one clause, which makes the circler always move clockwise, never buying nor selling. Try

    run( circler, 18 ).
and see what happens.

Now, how can you try act for yourself? You need several things. Firstly, the board-description predicates square, building, in, loop, adjacent, clockwise, distance, sells, buys and sells_fuel must be in place. Well, this would have happened when you loaded TRAVELLER.

Secondly, you need to fake up some facts which represent a circler at some point in its travel. These are the ones defined by at, carries, cash, fuel, max_load, tank_size and total_load. These are treated specially. As run proceeds, it updates the knowledge base with these predicates. You can add your ``faked'' ones via VED.


next up previous
Next: Testing act
Up: The game of Traveller (PP)
Previous: Running a trader
Back: to main list of student notes



Jocelyn Paine
Tue Jun 4 17:58:48 BST 1996