[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cse471 project 1 question



At 10:22 PM 9/8/2001 -0700, you wrote:
>Hello,
>
>I have a question about the first part of the project. Which fields of the
>structure "node", are we supposed to hard code, before supplying it to A*
>function? I am assuming that we hard code:
>PARENT,
>ACTION,
>G-VAL,
>H-VAL
>
>The STATE is assigned later, inside the A* function,
>I am not sure about the F-VAL. Should I hard code it or calculate it on the
>fly?


Everything is filled in by A* search (children generator function, to be 
precise) on the fly. See the discussion of project 1 on Tuesday's class.

>I also have a question about the H-VAL. Should it be similar to the graph
>example, that is should h(n) =< h*(n)?

The heuristic functions you will use are going to be admissible anyway 
(misplaced tiles and manhattan distance are admissible for 8-puzzle)

>And yet another question:
>If the first part of the project will be tested on your set of nodes, should I
>make certain assumptions about the data type of say STATE, ACTION or F-VAL?
>Like an integer, a float, an atom, etc.

Lisp is a type-less language. So, you *don't have to* declare types for 
fields (although there are
ways of declaring datatypes if you really want to ). For the project you 
can avoid declaring types
and just ensure type consistency through code.

*please make sure that all the other questions are cc'd Terry (TA) too or 
they won't be answered until I get back

Rao


>thanks,
>Monika