• jeremiah.thomas (1/14/2010)


    I think i am with Valued member. how do we read the grid that decipherDNA creates?

    here is a short example of the grid:

    n s e w c a

    0 0 0 0 1 4

    0 0 0 1 1 4

    0 0 0 2 1 4

    0 0 1 0 1 4

    0 0 1 1 1 1

    0 0 1 2 1 3

    0 0 2 0 1 4

    0 0 2 1 1 1

    0 1 0 0 1 3

    Ok, I have it figured out now. That first line is not what the robot did first. It's what it would do if it encountered that situation, (no can north,south,east,west but it's current location had a can. It would pick it up as indicated by the last digit "4". What you need to do is take it's starting location of 0,0 and determine what the robot would see at that location. It sees 2 1 1 2 1 (that's wall north and west, can south, east and current location.) Now find that in the results of the DecipherDNA script. Oh, first remove the WHERE CLAUSE on the last line. select * from @rules is what you want.