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

#26 2010-05-12 18:15:18

waveOSBeta
Scratcher
Registered: 2009-12-08
Posts: 1000+

Re: Pathfinder AI

Please do. And Cool!


http://internetometer.com/image/10202.png]
New signature coming soon!  smile

Offline

 

#27 2010-05-12 20:15:49

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Pathfinder AI

What a wonderfully elegant algorithm and project!  Very impressive  smile


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#28 2010-05-12 20:41:29

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

Thank you! This project was far more successful than I'd have expected! Thanks everyone!

Offline

 

#29 2010-05-21 21:18:26

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: Pathfinder AI

coolstuff wrote:

Then, by starting on the starting point, you need only go towards the smallest number, because smaller the number, the closer you are to the goal. In this case, you would take 19, 18, 17, 16, 13, 8, 3, then the goal.

I can see why taking the smallest neighboring number gets you closer to the goal, but it's not obvious to me that taking the smallest number right here always gives you the shortest path overall.  (Since you give different unique numbers to squares equally far from the goal, maybe the overall shortest path isn't the one that you found first on your way outward from the goal.) Can you prove this is optimal?

PS That's not to say that I don't appreciate the awesomeness of the project!

PPS If you and AddZero are experts at making things run faster, would you like to take a look at BYOB?


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#30 2010-05-21 21:33:54

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

bharvey wrote:

coolstuff wrote:

Then, by starting on the starting point, you need only go towards the smallest number, because smaller the number, the closer you are to the goal. In this case, you would take 19, 18, 17, 16, 13, 8, 3, then the goal.

I can see why taking the smallest neighboring number gets you closer to the goal, but it's not obvious to me that taking the smallest number right here always gives you the shortest path overall.  (Since you give different unique numbers to squares equally far from the goal, maybe the overall shortest path isn't the one that you found first on your way outward from the goal.) Can you prove this is optimal?

I can't prove it, but you'll notice from the project that it works. If you think about it, it works quite well - because you're finding the fastest way from the "you" square to the goal, it works perfectly. It's hard to explain.

And I'm sorry, but I know only how to make Scratch projects work faster.

Offline

 

#31 2010-05-22 04:49:19

CHEZA69
Scratcher
Registered: 2010-04-13
Posts: 69

Re: Pathfinder AI

This is the work of a genius really awesome project


http://img576.imageshack.us/img576/2969/69i.png

Offline

 

#32 2010-05-22 08:19:58

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

CHEZA69 wrote:

This is the work of a genius really awesome project

Thanks! That really means a lot to me!

Offline

 

#33 2010-05-24 17:13:48

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

I've updated it to fix a bug that a number of users were experiencing: you can put "You" and "Goal" on the same square and confuse the system. That no longer can happen.

Offline

 

#34 2010-05-24 21:21:43

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

This is a REVOLUTIONARY project! Everyone, thou shalt see it! Discover what everyone's raving about:

Keleymeister: "Wow, that works really well!"

Addzero: "This works well, nice work!" "Neat project" "Awesome job!" "Very cool!"

AnnoyingOrange: "This is a fun game! Great job at making everything!"

Paddle2See: "What a wonderfully elegant algorithm and project!  Very impressive " "Wow...that's really impressive!" "Lot's of fun! The only way I could confound it was to give it an impossible situation  smile "

CHEZA69: "This is the work of a genius really awesome project" wow thats really impressive with an impressive script to go with it

Lucario621: "very impressive! It works great!"

imacat: "woah."

Jonathanpb: "That's brilliant, coolstuff!"

Shadow_7283: ":0... This is probably the best pathfinding AI on Scratch. I've made several attempts at a similar AI, but they have never worked even close to as well as this."

RHY3756547: "Wow - this beats lucario's by like, a thousand miles. Great job! Never got stuck in any of the thousands of dead ends I set up.  tongue "

iCode-747: "Amazing!"

Illusionist: "Amazing!"

aweman: "INCREDIBLE! I made a simple maze for it, and it did it INSTANTLY!"

Kewlbeanz: "nice work  smile "

Frydad: "Geez, this is cooler EVERY SINGLE TIME. I'm just plain impressed…"

Jimothy: "awesome! this gives me a lot of good ideas!"

Offline

 

#35 2010-05-25 06:14:03

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: Pathfinder AI

So cool!


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#36 2010-05-25 13:35:15

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: Pathfinder AI

My brother, Mathwizz, Made one that is praticly flawless. This is the link http://scratch.mit.edu/projects/MathWizz/803671


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

#37 2010-05-25 17:01:39

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

rabbit1131 wrote:

My brother, Mathwizz, Made one that is praticly flawless. This is the link http://scratch.mit.edu/projects/MathWizz/803671

Hey, that's some pretty nice work! I still did manage to get it stuck in a few dead ends, though, which my Pathfinder won't do  smile

Offline

 

#38 2010-05-29 16:03:31

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

I've updated it so that the loading is even faster than before. I also fixed a few bugs, but also made it so that the 1-sprite-1-scriptness was gone. The script just got too long to work with!

Any suggestions for future updates would be greatly appreciated!

Offline

 

#39 2010-05-30 21:09:20

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

*Bump*
I really need suggestions for future updates now  smile

Offline

 

#40 2010-05-30 21:14:19

nerevar
Scratcher
Registered: 2010-05-30
Posts: 20

Re: Pathfinder AI

very cool! what algorithm did you use? A*?

Offline

 

#41 2010-05-30 21:17:22

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

nerevar wrote:

very cool! what algorithm did you use? A*?

Nah, that's too unreliable for me  smile
I used the example algorithm on the Wikipedia article for pathfinding - I describe it in the first post of this thread.

Do you have any suggestions on how I could make it better or more advanced? I've been thinking of sorts of "detours" but the script is too well established for me to implement that.

Offline

 

#42 2010-05-30 21:24:00

nerevar
Scratcher
Registered: 2010-05-30
Posts: 20

Re: Pathfinder AI

well i'm trying to open in scratch, but the script is so large i can hardly do anything cause scratch is lagging a lot.

Offline

 

#43 2010-05-30 21:32:27

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

nerevar wrote:

well i'm trying to open in scratch, but the script is so large i can hardly do anything cause scratch is lagging a lot.

Actually, the script was so large I had to split it in two because it kept giving these funky error messages. If there's one thing I hate about Scratch, it's the lag with larger scripts. I can give you an image of it, though, if you'd like.

Offline

 

#44 2010-05-30 21:34:13

nerevar
Scratcher
Registered: 2010-05-30
Posts: 20

Re: Pathfinder AI

that'd be great if you could, not sure how much i can help, but i can try

Offline

 

#45 2010-05-30 21:37:28

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

nerevar wrote:

that'd be great if you could, not sure how much i can help, but i can try

Well, I'm not looking so much for help with the coding; that shouldn't be a problem. I'm just looking for ideas on what to add to it.

Offline

 

#46 2010-05-30 21:44:48

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

Hm... I tried taking a picture of it, but Scratch freaked out at me - sorry!

Offline

 

#47 2010-06-02 22:13:16

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

*Bump - again*
Any suggestions for improvements would definitely be greatly appreciated - thanks in advance! I'm always looking for ways to improve this  smile

Offline

 

#48 2010-06-13 14:22:02

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Pathfinder AI

Bumpetyboo.

Offline

 

#49 2010-06-18 14:44:40

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Pathfinder AI

Idea then, how about difrent levels. So you can go up ramps and down ramp, so you get elevated platforms.


You can now reach me on Twitter @johnnydean1_

Offline

 

#50 2010-08-02 12:35:04

fireaction2001
Scratcher
Registered: 2010-03-24
Posts: 12

Re: Pathfinder AI

<say[omg im on scratch fourums( <cool< <=>true  )

Offline

 

Board footer