Okay this is a homework question, and I just don't have a clue how I suppose to start. Some help and hints will be much appreciated.
I need to use a heuristic function to solve a maze type problem.
Suppose I have a 5x5 grid, and a robot in position (1,5) and my goal is to move the robot to (5,1). Along the way there are few obstacles, say (X,1,3)
, (X,2,3)
, (X,5,3)
, (X,4,2)
Print out the route the robot has gone through.
I'm thinking using the greedy best first search algorithm to find a path for robot to the goal
My problem is, I'm new to scheme have no idea how I should start on solving this kinda problem.
Should I ?
(define grid l w) --define the length and width of the grid ?
(define robot) --define the initial position
(define goal) --define the goal position
(define blocks) --define the obstacle blocks
and create a main function (define bestfirstslove)
to solve the problem ?
How can I create a grid ? How should I approach to this problem ? How can I print out the steps the robot travels ?
Help is much appreciated :)