This is a demo of a car that 'learns' it's way around the track.
http://scratch.mit.edu/projects/bigB/222253
Offline
So help me understand what your goal was here.
What do you mean by learning?
Is it gaining information about the track or developing a procedure for responding to sensor input?
Why so many sprites?
Offline
I'm not sure what my goal was I was just experimenting.
By learning I mean each time it attempts the course it will tackle it differently depending on what happened in it's last attempt.
It doesnt respond to the sensor input as such because as soon as it crashes it restarts rather than bouncing off. This means that once it has "learnt" the whole track it no longer needs any sensors.
The number of sprites is unnecassary but it was just a quicker way of making the project. It stores variables for speed and turning for many small sections of the course. The first sprite moves (moves) steps and turns (turn) degrees for 70 repitions and the n the next sprite carries on doing the same. I used many spites so i could use local variables and did not need to keep creating new variables, instead i just copied more cars.
Offline
New and improved. you should now be able to see it complete the course alot quicker.
http://scratch.mit.edu/projects/bigB/222253
Offline
Thanks for the clarification. It gave be the framework to appreciate your scripts. I'm working on my version.
Offline
bigB wrote:
New and improved. you should now be able to see it complete the course alot quicker.
http://scratch.mit.edu/projects/bigB/222253
Good work!
Offline