in reply to Re: Challenge: Ricochet Robots
in thread Challenge: Ricochet Robots
here a (handmade) visualization from my solutions (some steps are in another order)
A B C D E F G H I J K L M N O P --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- 1| | g6 g(R)| |1 . .---. . . . . . . . . . . .---. . 2| | | |2 . . . . . . . . . . . . . . . . 3| | |3 . . . . . . . . . . .---. . . . . 4| | |4 . . . . . .---. . . . . . . . .---. 5| |5 ---. . . .---. . . . . . . . . . . . 6| | |6 . . . . . . . . . . . . . . . . 7| | | |7 .---. . . . . .---.---. .---. . .---. . . 8| R14 g15 g12| | | |8 . . . . . . . . . . . . . . . . 9| Y16 | | |9 . . . . . . .---.---. . . .---. . . . 10| | B | |10 . . . .---. .---. . . . . . . . .---. 11| | |11 ---. . . . . . . . . . . . . . . . 12| r5 g9 y10 gr y3 |12 . . . . . . .---. .---. . . . . . . 13| | | |13 .---. . . . . . . . . . . . . . . 14| y1 (Y)| | |14 . . . . . . . . . . . . . .---. . 15| | | |15 . . .---. . . . . . . .---. . . . . 16| |(G) | |16 --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- A B C D E F G H I J K L M N O P
> The code is ugly, but works:
well mine is uglier (but I was at the start of my Perl career ;-)
I didn't analyze your code yet.
But I think yours is swapping much less than mine.°
Want a harder challenge? =)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
PS: did you have fun? :)
°) nope, you need 2GB RAM mine only 0.5GB
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Challenge: Ricochet Robots
by choroba (Cardinal) on Feb 19, 2021 at 13:40 UTC | |
by LanX (Saint) on Feb 19, 2021 at 14:15 UTC |