Encoding a searching space.



Greetings.

Let suppose that i want to use AG to solve such problem:

We have given board with size 10x10. We have also a one unit which can move
in any direction and at any range. X and Y are parameters which I would like
to encode to binary string. Position which is described by X and Y is then
evaluated. To store one parameter I need 4 bits. But on four bits I can have
16 values of one parameter and I need only 10. So my question is, what
should I do in for example such situation:

1100 1111
| |
X Y

We see that X=12 and Y=15 which is position out of the board. Should my
fitenss function evalute such position as 0? Is it a good approach? Is there
a better solution?

Thanks for any help,

Wodzu


.