This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-07-23 11:39:37

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Learning AI Car Demo

This is a demo of a car that 'learns' it's way around the track.
http://scratch.mit.edu/projects/bigB/222253


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#2 2008-07-23 11:51:35

ashbyr1
Scratcher
Registered: 2007-12-04
Posts: 100+

Re: Learning AI Car Demo

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?


Learn the basics with these video tutorials.
Or nominate an All Star Animation.

Offline

 

#3 2008-07-23 11:58:46

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: Learning AI Car Demo

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.


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#4 2008-07-24 09:39:50

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: Learning AI Car Demo

New and improved.  you should now be able to see it complete the course alot quicker.
http://scratch.mit.edu/projects/bigB/222253


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#5 2008-07-24 10:22:41

ashbyr1
Scratcher
Registered: 2007-12-04
Posts: 100+

Re: Learning AI Car Demo

Thanks for the clarification.  It gave be the framework to appreciate your scripts.  I'm working on my version.


Learn the basics with these video tutorials.
Or nominate an All Star Animation.

Offline

 

#6 2008-07-24 10:27:56

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: Learning AI Car Demo

using one or at least fewer sprites would be neater and better but i was too lazy.


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#7 2008-07-24 10:37:35

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: Learning AI Car Demo

I love this demo!  big_smile


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#8 2008-07-24 15:02:39

dbal
Scratcher
Registered: 2007-07-19
Posts: 100+

Re: Learning AI Car Demo

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!


Dick Baldwin - Don't get stuck scratching. When you master Scratch, move on up to more serious programming languages. Free online programming tutorials:
Scratch - Alice - Java - C# - C++ - JavaScript - XML - Python - DSP

Offline

 

Board footer