Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Super Fast Pathfinding
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 577
Join Date: Nov 2008
Location: In the interwebs
Default Super Fast Pathfinding - 06-17-2010, 10:09 AM

Here it is! After a lot of labor, I finally finished a Jython path-finding demo, with complete graphics and all that stuff! Just make the square you want impassible, then press enter, and click on the start and end points. Voila! A path will be found in the blink of an eye if there is one. Most of the time spent is transferring the Alice lists to 2d array form. I could remove this, but it'd make the code too complex to easily understand, so it was left as is. Enjoy!
Attached Files
File Type: a2w pathfind demo.a2w (226.9 KB, 44 views)


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.

Last edited by zonedabone; 06-17-2010 at 10:30 AM.
   
Reply With Quote
Old
King Gamer(gorit)
Guest
 
Status:
Posts: n/a
Default 06-17-2010, 03:32 PM

I found an error. If you block a bunch of blocks in the midle and start one one corner and end at the opisite it doesnt find a path.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 577
Join Date: Nov 2008
Location: In the interwebs
Default 06-17-2010, 03:48 PM

It can only go diagonally if there are no corners in the way. Therefore, if you make a diagonal wall it won't go through. If it still doesn't work, post a 1,0 grid of how it looks. I'll see if it has a problem.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
King Gamer(gorit)
Guest
 
Status:
Posts: n/a
Default 06-17-2010, 09:26 PM

I can't recreate it because I forgot the way i put it.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 577
Join Date: Nov 2008
Location: In the interwebs
Default 06-18-2010, 08:17 AM

In the newest one I'm going to add something like if this looks bad, press ESC, and it will upload it to a server for crazy testing my moi. BTW, I just had a dream that I saw you in church. CRAZY.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
bug
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Exclamation bug - 06-18-2010, 08:55 AM

Path could not be found:
Attached Images
File Type: jpg bug.jpg (47.8 KB, 66 views)


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬
   
Reply With Quote
very
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default very - 06-18-2010, 09:00 AM

its very good. I think I know why I got that bug; first you make an impassible path then after it says its impassible it clears away the impassible squares that are are on a path that it previously found that is passible, then if you try to do it it again on the clear path it made it says its impassible.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [¬º-°]¬

Last edited by arty-fishL; 06-18-2010 at 09:03 AM.
   
Reply With Quote
Old
King Gamer(gorit)
Guest
 
Status:
Posts: n/a
Default 06-20-2010, 10:19 AM

Quote:
Originally Posted by zonedabone View Post
In the newest one I'm going to add something like if this looks bad, press ESC, and it will upload it to a server for crazy testing my moi. BTW, I just had a dream that I saw you in church. CRAZY.
Were you um... High. No, Just kidding. But, I mean see me in church that is almost crazy. There are several cool things about this. First idea is this is perfect for ai.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 577
Join Date: Nov 2008
Location: In the interwebs
Default 06-20-2010, 01:24 PM

I'm sorry, but I have crazy dreams. You had black hair, and you looked like someone in one of those AXE commercials.

Also, in the newet verson, I added a feature where it cleans the board after each time, so what you see is what you get.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.

Last edited by x2495iiii; 06-20-2010 at 10:16 PM. Reason: Double-posts
   
Reply With Quote
Reply

Tags
jython, zonedabone

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.