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

#1 2010-06-16 04:05:46

stickmanmessage
Scratcher
Registered: 2009-07-14
Posts: 41

A real time pathfinding AI

has anybody figured out how to do this with a moving goal? I'd like some help.


Anyone here play steel sentinels? Tell me ^.^0101 1001011 10111 10101 110111 10011011 10101 1011 101 11 101010 10101001 1010 001 1001 001 11 01 1010101 0101 001 0010 100101 01001001001 01001001010010 0100101010101010100010100110101010010101010010101010110010101010010110100010101010011-10010101001000101010010100101010010101001100101001 1010011010011
Too many lines ^.^

Offline

 

#2 2010-06-16 12:30:47

AmoebaMan
Scratcher
Registered: 2009-01-26
Posts: 500+

Re: A real time pathfinding AI

yeh.  i made one, but then i deleted it.  i'll try to remake it for you.


http://i942.photobucket.com/albums/ad269/RyanScathe/AmoebaMan.png

Offline

 

#3 2010-06-16 15:35:26

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: A real time pathfinding AI

stickmanmessage wrote:

has anybody figured out how to do this with a moving goal? I'd like some help.

make a 10x10 square, and divide the stage into 10pixel squared graph paper, now, fill in a path by using the squares as a guidline, color the outer pixels of the squares four sides and use the different colors of each as hittests to find a route;

Code:

if  color(left) not touching color(wall)
change x by -10
if color(right) not touching color(wall)
change x by 10
if color(up) not touching color(wall)
change y by 10
etc

Yes, I've seen this method used before except, wait.

It's not working on a current project that I tested it on D:. but it would work with more than 15 mins of work.


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#4 2010-06-17 09:58:49

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

cds56 wrote:

stickmanmessage wrote:

has anybody figured out how to do this with a moving goal? I'd like some help.

make a 10x10 square, and divide the stage into 10pixel squared graph paper, now, fill in a path by using the squares as a guidline, color the outer pixels of the squares four sides and use the different colors of each as hittests to find a route;

Code:

if  color(left) not touching color(wall)
change x by -10
if color(right) not touching color(wall)
change x by 10
if color(up) not touching color(wall)
change y by 10
etc

Yes, I've seen this method used before except, wait.

It's not working on a current project that I tested it on D:. but it would work with more than 15 mins of work.

Do you think I didn't already try that. The problem is in a maze, it'll get stuck.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#5 2010-06-17 14:04:39

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

Help me?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#6 2010-06-17 14:48:12

cds56
Scratcher
Registered: 2008-05-02
Posts: 500+

Re: A real time pathfinding AI

juststickman wrote:

Help me?

I don't really do AI.

But I could try to help...

I have..


http://img192.imageshack.us/img192/909/meowdevlogo.pnghttp://i32.tinypic.com/pucti.png

Offline

 

#7 2010-06-18 11:14:38

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

Can somebody help?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#8 2010-06-18 14:07:50

Subh
Scratcher
Registered: 2010-05-25
Posts: 100+

Re: A real time pathfinding AI

yes.
http://scratch.mit.edu/forums/viewtopic.php?id=35643
http://scratch.mit.edu/projects/coolstuff/1034493
But the project is not for Moving. its for STATIONARY Objects


http://wiki.scratch.mit.edu/skins/scratch/logo.png     I'M IN Scratch Wiki .... ARE YOU ????

Offline

 

#9 2010-06-18 15:30:59

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

Then it's useless. My problem is moving goals.

Last edited by juststickman (2010-06-18 15:31:10)


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#10 2010-06-19 03:59:06

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

Help meh?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#11 2010-06-19 05:52:54

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

Re: A real time pathfinding AI

That has got a moving goal have you seen it?


You can now reach me on Twitter @johnnydean1_

Offline

 

#12 2010-06-19 08:49:38

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

johnnydean1 wrote:

That has got a moving goal have you seen it?

What?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#13 2010-06-19 08:51:14

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

Re: A real time pathfinding AI

Have you seen the project?


You can now reach me on Twitter @johnnydean1_

Offline

 

#14 2010-06-19 08:55:02

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

Re: A real time pathfinding AI

juststickman wrote:

Then it's useless. My problem is moving goals.

I might be able to modify it for moving goals  smile

Offline

 

#15 2010-06-20 04:41:50

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

coolstuff wrote:

juststickman wrote:

Then it's useless. My problem is moving goals.

I might be able to modify it for moving goals  smile

Maybe you will. But in the end, the main problem would be the speed... I'd have to duplicate all the checking blocks instead of repeats 10+ times....


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#16 2010-06-20 13:42:10

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

Re: A real time pathfinding AI

juststickman wrote:

coolstuff wrote:

juststickman wrote:

Then it's useless. My problem is moving goals.

I might be able to modify it for moving goals  smile

Maybe you will. But in the end, the main problem would be the speed... I'd have to duplicate all the checking blocks instead of repeats 10+ times....

Yeah, right now it duplicates a few times AND repeats a few times. The scripts are too hard to work with right now.

Offline

 

#17 2010-06-22 08:16:50

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

can you post it?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#18 2010-06-22 09:40:05

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: A real time pathfinding AI

coolstuff wrote:

juststickman wrote:

coolstuff wrote:

I might be able to modify it for moving goals  smile

Maybe you will. But in the end, the main problem would be the speed... I'd have to duplicate all the checking blocks instead of repeats 10+ times....

Yeah, right now it duplicates a few times AND repeats a few times. The scripts are too hard to work with right now.

Wow... Just wow... It must be long! When you post it I'll make the script without repeat blocks for you.  tongue

Last edited by MathWizz (2010-06-22 09:42:51)


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#19 2010-06-22 16:30:50

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

Re: A real time pathfinding AI

juststickman wrote:

can you post it?

Well, my computer freezes every time I try doing anything with it... So probably not.

Offline

 

#20 2010-06-23 04:44:44

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

coolstuff wrote:

juststickman wrote:

can you post it?

Well, my computer freezes every time I try doing anything with it... So probably not.

0_o

Can you post the concept? Don't be specific to the point of posting code but don't be so vague that all you're saying is...
find the move that makes you closest to the goal.


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#21 2010-06-25 09:15:31

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

Anybody?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#22 2010-06-27 14:47:15

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

...


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#23 2010-06-27 16:32:36

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

erm.... anybody?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#24 2010-06-27 16:55:07

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: A real time pathfinding AI

I'll attempt to do it.

Can't say for sure if I'll be successful...

Offline

 

#25 2010-06-30 04:18:39

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: A real time pathfinding AI

So, how did it go?


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

Board footer