[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
How would you write a program to solve this maze without simply
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 28
Thread images: 4
File: Ultimate Puzzle.png (4 MB, 5769x5769) Image search: [Google]
Ultimate Puzzle.png
4 MB, 5769x5769
How would you write a program to solve this maze without simply following a wall until you reach the end?
>>
metaheuiristic and stats maybe.
>>
Put OP's image into paint and use the bucket tool to fill the gaps. Post the time it takes to complete.
>>
>>47698165
cut it into a grid of multiple pieces, find the longest contiguous lines of white from one edge of the piece to the other edge and then attempt to connect those edges on the other pieces
>>
look at graph theory. The best you are going to get is O=nLog(n)
>>
>>47698165
montecarlo
>>
>>47698165
you would need to take the picture in as a buffered image, use an edge detection algorithm to get the walls (easy if all same color), and go from there.
>>
>>47698215
I tried with red paint in GIMP but it just turns black.
>>
>>47698165
College kids do this all the time. It's call the micromouse competition. Also, wall following is useless and mazes in competition are always constructed so any idiot dumb enough to try wall following will be stuck doing circles around an island (not that they would have won even if the mazes weren't constructed like that; such an inefficient algorithm would be waaaay too slow to beat anyone).
>>
File: 1429730651923.png (3 MB, 5769x5769) Image search: [Google]
1429730651923.png
3 MB, 5769x5769
Here's the solution by the way

https://archive.moe/v/thread/291733942/#291768810

Captcha: endif
>>
I would have the program increase the size of the image by one pixel on the sides and then go around
>>
>>47698278

>gimp

Autistic enough to use it yet not know how
>>
>>47698297
Algorithm?
>>
>>47698506
I wanted to ask the guy for the code, but the thread 404'd.

You can follow those replies, he does say a few things about it.
>>
I'm not amazing with algorithms, but would you not just be able to take it in arbitrary "steps" and draw a line from the current location to the exit and check from that line outward?
>>
>>47698215
Started, had a nap, still waiting.
>>
>>47698680
Paint.net did it in a few seconds and I'm on a laptop.
>>
>>47698243
That wouldn't really work

If the solution only cuts through the corner of one of the pieces, then something other than the real solution would be linked to the other pieces
>>
>>47698165
A* would be a start
>>
>>47698728
i don't think a* would be efficient enough for that.
>>
http://courses.cs.washington.edu/courses/cse326/09sp/projects/proj2/t2.html
>>
>>47698680
I'm trying to just kill paint now. It isn't happening. wat do?
>>
>>47699261
decided to reboot since there were updates to install
>>
>>47698165
BFS, then do something less naive.
>>
>>47698165
A* Algorithm or similar
>>
File: 1430022346675.png (2 MB, 5769x5769) Image search: [Google]
1430022346675.png
2 MB, 5769x5769
>>47698165
I dunno but optimise your fucking pngs.
>>
File: moses.jpg (55 KB, 708x327) Image search: [Google]
moses.jpg
55 KB, 708x327
>>47698513
Well, you just summoned the guy.
>>
>>47698279
How can the walls of the entrance of any maze be an island? I don't think that is possible
Thread replies: 28
Thread images: 4

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.