Is it possible, that you set an unpassible block (or whatever) in the middle and when you click at a destination, a sprite will automatically avoid the block to get to the place you've clicked WITHOUT PLAYER'S MANUAL GUIDANCE? If yes, is it possible to let it move in a way that will avoid the block entirely (not touching it at all, not to hit the border then turn) just to skirt the perimeter in a natural, non-erratic way?
Offline
I'm sure it is possible...let's look at the second part first. You could have hidden sensor sprites that surround the sprite and give it information about obstacles around it. Archmage has a project that shows how this is done here:
http://scratch.mit.edu/projects/archmage/101212
As for walking around objects, I don't think that would be hard to do either. Here is a very crude attempt that I threw together very quickly:
http://scratch.mit.edu/projects/Paddle2SeeFixIt/186501
Offline
Interesting problem.
Paddle2See, your's is perfect for small obstacles- what lestrade3333 is trying to do.
I puzzled over AI navigation for a while, this is a good time to try it out! It can do some larger obstacles, but it can still give up and do nothing. It could be improved.
http://scratch.mit.edu/projects/AddZero/186736#
Last edited by AddZero (2008-06-12 21:28:48)
Offline
I should make one of these, since they working AI seems to be a popular topic now
Offline
It's really nice, folks, thanks a lot.
Offline
Yeah, these are fun...thanks for bringing it up lestrade333! I'm working on a more sophisticated version now that may or may not actually work. I'll let you know if it leads to anything useful.
Offline
I made one here
http://scratch.mit.edu/projects/deatheater/187379
Offline
you're making me feel like a tinker...
Offline
lestrade3333 wrote:
you're making me feel like a tinker...
I'm sorry, I'm not familiar with that saying...how does a tinker feel?
Offline
Paddle2See wrote:
lestrade3333 wrote:
you're making me feel like a tinker...
I'm sorry, I'm not familiar with that saying...how does a tinker feel?
I think he means "thinker"
Offline
no, I think it's a reference from Paganini (or someone of the sort) when he heard Brahm's third symphony, in other words, you make me feel stupid.
Offline
lestrade3333 wrote:
no, I think it's a reference from Paganini (or someone of the sort) when he heard Brahm's third symphony, in other words, you make me feel stupid.
No need to feel stupid! You've raised up one of the more challenging and interesting problems that you can attempt to solve with Scratch. Problems of this caliber tend to attract the more advanced programmers. You can use as much or as little of what they produce as you wish. If you have questions on a particular technique, I'm sure the author would be happy to answer them. Thanks for keeping Scratch interesting!
Offline
deatheater wrote:
I made one here
http://scratch.mit.edu/projects/deatheater/187379
Great programs are made to be broken ):
Click inside the elbow very close to the black material and the cat will go into an endless loop trying to find a way to solve the problem.
Offline
dbal wrote:
deatheater wrote:
I made one here
http://scratch.mit.edu/projects/deatheater/187379
Great programs are made to be broken ):
Click inside the elbow very close to the black material and the cat will go into an endless loop trying to find a way to solve the problem.
I applaud the AI's persistence.
What if a door opened to the solution, or the obstacle moved.
The lazy AI would not get it.
Now if the AI would hurt himself or others by continuing forever- and not find food for example... then that's a bad thing. It's just being obedient.
Last edited by AddZero (2008-06-14 12:30:15)
Offline
AddZero wrote:
dbal wrote:
deatheater wrote:
I made one here
http://scratch.mit.edu/projects/deatheater/187379
Great programs are made to be broken ):
Click inside the elbow very close to the black material and the cat will go into an endless loop trying to find a way to solve the problem.I applaud the AI's persistence.
![]()
What if a door opened to the solution, or the obstacle moved.
The lazy AI would not get it.
Now if the AI would hurt himself or others by continuing forever- and not find food for example... then that's a bad thing. It's just being obedient.
No quarrel with that. However another option might be for the cat to loiter in the immediate area ready to pounce when the door opens instead of making another trip around the obstacle.
It is interesting to wonder what a real cat or perhaps a hunting dog would do if confronted with a similar situation.
That's why AI is so much fun. There are often no right solutions or wrong solutions. Only (hopefully) good solutions.
Last edited by dbal (2008-06-14 13:40:08)
Offline
AddZero wrote:
dbal wrote:
deatheater wrote:
I made one here
http://scratch.mit.edu/projects/deatheater/187379
Great programs are made to be broken ):
Click inside the elbow very close to the black material and the cat will go into an endless loop trying to find a way to solve the problem.I applaud the AI's persistence.
![]()
What if a door opened to the solution, or the obstacle moved.
The lazy AI would not get it.
Now if the AI would hurt himself or others by continuing forever- and not find food for example... then that's a bad thing. It's just being obedient.
No if a door opened it would choose a path to get in. it tells the cat to choose a path in, because it's so far in the cat can't reach it, if it had an opening the cat would try to get to the target anyway possible without touching the black
Offline
If anyone is interested in an advancement of the matter, here is another question:
(first see the second demonstrative project by Paddle2See)
He shows three black balls which the cat avoids if it hits them.
He does that by a hidden sensor dish, which is also circular.
His programming takes advantage of the fact that when the two circles hit each other, the curve gradient of the two arc should just be able to make the cat look like it skirts at the edge.
But the problems are thus:
1) what if the obstacles are not circular?
2) If two circles are placed near each other, they act like a messed-up gravimetrical field (or a magnetic field, at any rate) and the cat would curve into one of the circles.
I am trying to make multiple blocks in a maze-like (but less complex) arrangement.
Oval obstacles have failed. Blocks don't work. So, maestroes of the Scratchworld, another dilemma to add to your list.
Offline
lestrade3333 wrote:
If anyone is interested in an advancement of the matter, here is another question:
(first see the second demonstrative project by Paddle2See)
He shows three black balls which the cat avoids if it hits them.
He does that by a hidden sensor dish, which is also circular.
His programming takes advantage of the fact that when the two circles hit each other, the curve gradient of the two arc should just be able to make the cat look like it skirts at the edge.
But the problems are thus:
1) what if the obstacles are not circular?
2) If two circles are placed near each other, they act like a messed-up gravimetrical field (or a magnetic field, at any rate) and the cat would curve into one of the circles.
I am trying to make multiple blocks in a maze-like (but less complex) arrangement.
Oval obstacles have failed. Blocks don't work. So, maestroes of the Scratchworld, another dilemma to add to your list.
My remix get's rid of that problem
Offline
I remember someone made one like that using 2 probes (one tests direct path to sprite)( another randomly looks for a clear path around) it works pretty good.
Offline
Rurigok, that's exactly what I need, is there a link?
By the way does the project you refer to chooses the logically shortest path to the target?
If you have the link, I would be really grateful.
Offline
lestrade3333 wrote:
Rurigok, that's exactly what I need, is there a link?
By the way does the project you refer to chooses the logically shortest path to the target?
If you have the link, I would be really grateful.
I've seen the same one, no it doesn't show you the quickest path
Offline
Here's the link to AddZero's two probe approach:
http://scratch.mit.edu/projects/AddZero/186736
Offline
Thanks, it was inspiring, but is there anyway to modify the AddZero program to 1)debug it? 2)let the cat find the quickest route instead of a random route? I read that Paddle2See wrote something about improving it in the comments section of that program, Are you done yet?
Offline
i will try improving addzero's project, see what i can do
Offline
Thanks so much.
Offline