Assignment #5: the Blackwood Mine Search Assignment

It is a dark and stormy time, and your bot is being tested. Three times, your bot will be dropped on a street, and three times your bot must find the Blackwood Mine.

The three drop points are near, medium, and far distances from the Mine:

1. Hilltop (#1036) - 3 streets away
2. Center Street 300 block (#703) - 21 streets away
3. Lumber Town (#764) - 34 streets away

You can access these with $g.mine_start[1], $g.mine_start[2], and $g.mine_start[3] or

for street in ($g.mine_start)
move(bot, street);
"code to find $g.blackwood_mine"
endfor

But a storm is raging, and some streets are closed due to weather. Luckily, your bot is equipped with this knowledge, and knows to avoid these streets because they are flooded and impassible:

1. Dense Forest (#601), $g.dense_forest, and the
2. Blackwood Town Square (#105), $g.town_square

Note: these might change, so before entering a new street you must execute the $g:road_closed(street) predicate, which returns a 1 if the road is closed, and a 0 of the road is not closed.

When one of these streets appears to be the next best path, your bot must choose another route. Although bots are supposed to use exits for navigation, when they are confronted with a flooded street, they are permitted to 'beam' themselves to the next best street in their history.

For your information, the final approach to the mine is

=> #1021 (Many More Rolling Hills) => w => #1036 (Hilltop)
=> #1036 (Hilltop) => w => #1043 (Smaller Hills)
=> #1043 (Smaller Hills) => s => #1050 (Blackwood Mine Main Street)
=> #1050 (Blackwood Mine Main Street) => mine => #1054 (The Blackwood Mine)

Assignment Requirements

1. (15 pts) begin three searches from the designated starting points
2. (60 pts) successful 'short' search (15 pts), 'medium' search (20 pts), 'long' search (25 pts)
3. (20 pts) base your algorithm on the simplified A* (pg. 75-76) using the same variable names as the textbook
4. (10 pts) use 'set' operators for the CLOSED list
5. (30 pts) write priority queue operators (enqueue (20 pts) and dequeue (10 pts)) for the OPEN list
6. (15 pts) never visit the $g.mine_flooded rooms


Contact: slator@cs.ndsu.edu; Modified: 11/06