You orginally asked for help, and now in the same posting your assisting me

Anyway, I dont have a "graphics system"
Originally I made a stupid thing in turing by drawing a square, then drawing a bunch of rectangles or squares over it... Then i had a blue circle (mouse) go after a yellow arc... I only ever got to the point where the "mouse" wouldnt go out side of the main square, but other than that it owuld just move randomly arund and thru walls until like 400 moves later it "might" run into the cheese...
I kinda came up with a good way to do this one day while I was sitting at work (im a telemarketer) anyway, I am outta programming for over a year now... and now Im am gonna learn c++ right now again, but I think the code you posted is still a little over my head(but I will give it a clear lookover) will it run by itself???
Anyway, just some of my abstract rambling(oh yeah, I meant like this:
*******************
* * * * * *CC*
* * * * * *
* * * *
* **** * * 1****
* **** 1*2 *
* **** * 1* 223 *
*SS111111112111*2 *
*******************
See, my main theory is that let the cpu randomly decide a way to go, and eac htime it gets more than one chance, let it decide again, however, you gotta check the "value" of each square, the above map shows a "mouse" trying to get to the CC without knowing where it is... It randomly starts out going east... keeps going past the first intersection, then makes a wrong turn, but when it goes to go back, the previous value is 1.. however, in that event, it just goes to the place it has been the least, so it escapes, and keeps going east(cause to go west would be going over all those ones, which are higher than the "0" or whatever value for the unchecked spaces... it then meets a wall, has to go up, then gets a chance to go up or right, it chooses right, then goes up, then goes down, and it keeps going one direction or the other til eventually the spaces it has passed grows larger(or as large as) the values of the spaces it must go back over, so then it just keeps going...
That is a whole lot of writing for nothing, and maybe my idea is stupid, but I just thought when I was younger that something not knowing where to go, can just choose randomly, and yet, if it can keep conscious of where its been before slightly, then eventually, it owuld cover a whole map until it got to its destination, while not the fastest way, its not as stupid looking as always turning left/right, and the cpu doesnt really "cheat" it just can sense how many times its been in that spot before, and then always goes to the place its been the least( or randomly if one or more of the same value are open)
Well, thats just my crazy rambling thoughts... Iwould love to see this idea implemented someday, but well have to see...