It is currently Thu Feb 23, 2017 8:46 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Maze & PathFinder A* (aStar algorythm)
Unread postPosted: Sun Jul 14, 2013 2:27 am 
Offline

Joined: Sat Mar 02, 2013 11:04 am
Posts: 769
Location: France
Hi all,

after a little lapse of attention and saved by Luca , I can share with you this little stylistic exercise :D

http://laughton.com/basic/programs/applications/Maze&PathFinder/

The menu :
- del : erase wall.
- wall : draw wall.
- green pawn : place the green pawn where you want : it's the start position.
- red pawn : place the red pawn where you want : it's the end position.
- diagonal : diagonal authorized or not for the PathFinder.
- show work : show the pathFinder's work (slower).

- PathFinder : launch the PathFinder.
- Maze Generator : create a new Maze.
- Reset : erase the field : with - / + you can increase or decrease the size of the field.

Sorry for little devices : this program need to be precise on touch (using a stylus maybe) and to be a little bit patient with the CPU...!
But you can choose a smaller size field.

Obviously the code could be improved but I needed a quick search of a cell in a list, and I choose to use strings and Is_In().
I don't know if this is the best choice in RFO! relative to the processing speed.

On my tablet Nexus7 I have an average of 6 sec. for PathFinder for 41x41 size with not diagonal and not show work.

What's funny is that it will never take exactly the same time if you restart the PathFinder on the same maze !

Have fun.

Gilles.

_________________
"It is better to mobilize intelligence for stupid things, rather than mobilizing stupidity for intelligent things."
Galaxy TAB S 8.4, 2560x1600, Marshmallow 6.0.1
Galaxy Note II, 1280x720, JB4.1.2
Galaxy A3, 1280x720, Android 6.0.1


Last edited by Cassiope34 on Wed Dec 28, 2016 4:13 am, edited 2 times in total.

Report this post
Top
 Profile  
 
 
 Post subject: Re: Maze & PathFinder
Unread postPosted: Tue Jul 16, 2013 5:13 am 
Offline

Joined: Sat Mar 02, 2013 11:04 am
Posts: 769
Location: France
Small improvement in processing speed using FORMAT$() rather than a user-defined function.

http://laughton.com/basic/programs/applications/Maze&PathFinder/

Someone know if using Bundles or Lists is more efficient than string commands?

Gilles.

_________________
"It is better to mobilize intelligence for stupid things, rather than mobilizing stupidity for intelligent things."
Galaxy TAB S 8.4, 2560x1600, Marshmallow 6.0.1
Galaxy Note II, 1280x720, JB4.1.2
Galaxy A3, 1280x720, Android 6.0.1


Report this post
Top
 Profile  
 
 Post subject: Re: Maze & PathFinder A* (aStar algorythm)
Unread postPosted: Wed Dec 28, 2016 11:48 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1241
That's amassing, Gilles ;)


Report this post
Top
 Profile  
 
 Post subject: Re: Maze & PathFinder A* (aStar algorythm)
Unread postPosted: Wed Dec 28, 2016 12:22 pm 
Offline

Joined: Sat Mar 02, 2013 11:04 am
Posts: 769
Location: France
Thx Roy, but it's an old code :)

_________________
"It is better to mobilize intelligence for stupid things, rather than mobilizing stupidity for intelligent things."
Galaxy TAB S 8.4, 2560x1600, Marshmallow 6.0.1
Galaxy Note II, 1280x720, JB4.1.2
Galaxy A3, 1280x720, Android 6.0.1


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred