Contents    Page-10    Prev    Next    Page+10    Index   

Tracing the Robot Mouse


>(mouse maze 4 9 '())
  1> (MOUSE #2A((* * * * * * * * * *)
                (* 0 0 * * * * * * *)
                (* 0 * * * * * * * *)
                (* 0 * * * * * * * *)
                (* 0 0 0 0 0 0 * * *)
                (* * * * 0 * 0 * * *)
                (* * * * 0 * 0 * C *)
                (* * * * 0 * 0 * 0 *)
                (* * * * 0 * 0 0 0 *)
                (* * * * 0 * * * * *)) 4 9 NIL)
    2> (MOUSE 3 9 ((4 9)))          ; west
    <2 (MOUSE NIL)                  ; hit the wall
    2> (MOUSE 4 8 ((4 9)))          ; north
      3> (MOUSE 3 8 ((4 8) (4 9)))    ; west
      <3 (MOUSE NIL)                  ; hit the wall
      3> (MOUSE 4 7 ((4 8) (4 9)))    ; north
        4> (MOUSE 4 6 ((4 7) (4 8) (4 9)))    ; north
          5> (MOUSE 4 5 ((4 6) (4 7) (4 8) (4 9)))    ; north
            6> (MOUSE 4 4 ((4 5) (4 6) (4 7) (4 8) (4 9))) ; north
              7> (MOUSE 3 4 ((4 4) (4 5) (4 6) (4 7) (4 8) ; west
                8> (MOUSE 2 4 ((3 4) (4 4) (4 5) (4 6)     ; west
                  9> (MOUSE 1 4 ((2 4) (3 4) (4 4) (4 5)   ; west
                    10> (MOUSE 0 4 ((1 4) (2 4) (3 4) (4 4) ; west
                    <10 (MOUSE NIL)         ; hit the wall
                    10> (MOUSE 1 3 ((1 4) (2 4) (3 4) (4 4) ; north
                    11> (MOUSE 1 2 ((1 3) (1 4) (2 4) (3 4)
                    12> (MOUSE 1 1 ((1 2) (1 3) (1 4) (2 4)
                    13> (MOUSE 1 0 ((1 1) (1 2) (1 3) (1 4) ; north
                    <13 (MOUSE NIL)         ; hit the wall
                    13> (MOUSE 2 1 ((1 1) (1 2) (1 3) (1 4) ; east
                    14> (MOUSE 1 1 ((2 1) (1 1) (1 2) (1 3) ; west
                    <14 (MOUSE NIL)   ; ! loop