Pages: 1
Topic closed
can you program a learning artificial intelligence in scratch, couse that would be cool
Offline
Sure you can. AI is something that works at several different levels. A simple level of (built-in) AI can be reached by using scripts and variables to store both behaviours of "intelligent" agents and things to be learned by them. A complex level of AI does instead require the possibility of storing a lot (and not pre-determined) amount of learned information. To do this you need arrays/lists and input/output to files. So... you have just to go and download the beatiful Jens' ListAndFiles hack (http://www.chirp.scratchr.org/blog/)
Offline
an interesting learning AI would be a car that learns the best way around a track. If it understeers it goes slower around that corner next lap etc.
i might give that a try actually.
i have a gallery for projects with AI's if you make a successful AI.
Last edited by bigB (2008-06-30 11:38:20)
Offline
fullmoon wrote:
This project has some racing AI, check it out!
hmmm... this is ok but I want a learning ai, not one that guesses
Offline
What kind of learning were you thinking of deatheater? As I said, a complex one could need arrays (that I guess are coming with the next version, as the translation table now contains strings such as "insert %s at %i of %L" and others). But if you explaing the sort of learning you need, it may be possible to get it by just using a few variables.
Offline
In order to create this, you will need:
A random action generator
A means of telling whether a sequence of actions was successful
A means of "saving" a sequence of succesful actions.
There was a nice AI simulator in an old robotics book I used to read, in which you simulated the learning AI of a robot "rabbit" trying to avoid a dumb robot "fox" using a pack of cards as the programmig and storage... wonder if I can remember it fully..
Offline
Mayhem wrote:
In order to create this, you will need:
A random action generator
A means of telling whether a sequence of actions was successful
A means of "saving" a sequence of succesful actions.
There was a nice AI simulator in an old robotics book I used to read, in which you simulated the learning AI of a robot "rabbit" trying to avoid a dumb robot "fox" using a pack of cards as the programmig and storage... wonder if I can remember it fully..
I see what you mean...maybe when it did the right action, it would store it as one BIG number variable, and when the time was right to do the action, it would read the instructions in the number with http://scratch.mit.edu/projects/Mayhem/99866 , and it would repeat, getting smarter as it goes.
Offline
Mayhem wrote:
In order to create this, you will need:
A random action generator
A means of telling whether a sequence of actions was successful
A means of "saving" a sequence of succesful actions.
There was a nice AI simulator in an old robotics book I used to read, in which you simulated the learning AI of a robot "rabbit" trying to avoid a dumb robot "fox" using a pack of cards as the programmig and storage... wonder if I can remember it fully..
I made a little AI simulation that is extremely simple but still may be able to be morphed into a marter AI. I will put up the project shortly.
Offline
no offence but the second one isn't learning.
Offline
deatheater wrote:
no offence but the second one isn't learning.
Yes, it doesnt learn, it just knows what to do when, and then attacks you when you attack it, or you get to close. Artificial intelligence doesn't exactly mean it learns i believe, but that it has the ability to respond to its surroundings.
Offline
newareagle wrote:
deatheater wrote:
no offence but the second one isn't learning.
Yes, it doesnt learn, it just knows what to do when, and then attacks you when you attack it, or you get to close. Artificial intelligence doesn't exactly mean it learns i believe, but that it has the ability to respond to its surroundings.
yes but the name of this topic, can u program a learning ai in scratch
Offline
I was thinking of an artificial intelligence that has a preset number of codes. When it does these codes, if (in a battle game for instance) that it gets hurt, it overwrites it and writes random code again. If it sort of sucseeds, then it figures out how it died, and when, and overwrites the code again. I might make a project about it.
Offline
I am going to try and program a learning A1 in scratch. Lets see if I can.
Offline
Heres a learning AI I have created. http://scratch.mit.edu/projects/bigB/222253
It is a car that learns to drive around a track.
Offline
bigB wrote:
Heres a learning AI I have created. http://scratch.mit.edu/projects/bigB/222253
It is a car that learns to drive around a track.
I am going for a person that avoids you and the walls in a semi maze.
Offline
I made a basic mouse get to cheese and through a maze Ai. Take a look! http://scratch.mit.edu/projects/Bobby500/239173
Offline
Topic closed
Pages: 1