Discussion:
about A4Q2
(too old to reply)
Donglin Han
2009-03-05 01:43:25 UTC
Permalink
do we have to write some predicate to make sure that half of the grids
are occupied by X's and other half by O's?
also it states that your formalization should ensure that whenever the
function loc is used, its arguments are greater than or equal to 0 and
less than J. does it means if invalid input of r and c to our function,
false should be return?

Thanks!
Nancy Day
2009-03-05 02:10:14 UTC
Permalink
Post by Donglin Han
do we have to write some predicate to make sure that half of the grids
are occupied by X's and other half by O's?
This isn't required by the rules of the game.
Post by Donglin Han
also it states that your formalization should ensure that whenever the
function loc is used, its arguments are greater than or equal to 0 and
less than J. does it means if invalid input of r and c to our function,
false should be return?
You shouldn't need to define the behaviour of loc, just state its relationship
to the other predicates/functions of the theory. And you only need to relate
the behaviour of loc to these other functions when loc has arguments that
greater than or equal to 0 or less than J.

cheers, nancy
CS245 Winter 2009 Instructor

Loading...