Jeux du Sort Vite

Discussion of challenges you have already solved
Post Reply
User avatar
Yharaskrik
Posts: 31
Joined: Wed Nov 05, 2008 11:44 am
Location: Germany

Jeux du Sort Vite

Post by Yharaskrik »

That was fun!
I wrote a Perl program to write a Superhack program.
Otherwise I would have gone mad...
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

nice program =)
cutter
Posts: 17
Joined: Mon Jan 12, 2009 12:50 pm

Post by cutter »

i wrote it by hand
now i am mad!!

only one question :

is the mark of the also accepted solution always related to the best mark this way (here 107%)
i thought it would be fix
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

some are fixed, some relative. i'm adding more fixed challenges.
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Post by Hippo »

I wrote it by hand as well and I was already mad during it's writing.

A lot of optimisation what would be really hard to generate.

At the end I have decided not to made more difficult challenge and I have not submitted solution faster than cutter did.

I have commented it on the Challenges thread ... only 2 algorithms looked feasible ... both were circuit layouts ... mergesort circuit / bitonic circuit. The winner was mergesort as bitonic circuit would need all threads in every phase, while mergesort gaves pauses to some of them.

I started my design by planning output on 4 turns.
This is why I have organised even threads to work (roughly) on memory in range 00 to 79,
while odd threads far away from others. (Of course the thread invoking the ! instruction neednot be the 1F one so other layouts were possible.)

There was a lot of manual optimization in moving subresults "along wires" ... direct addressing in range 00 to 99 was helpful, several times the pausing thread pulls and pushes to speed up otherwise "overloaded" thread. Even threads were pausing only in early rounds to prepare for addressing, later as there were able to use fast addressing they never more pased. Odd threads must have push and pull to wires so without pausing they would be bottlenecks.

Making 32 threads working on different memory and code as fast as possible was of course important.
(Organisation slightly differed from fast string reversal as there was need of thread "pairing" in the latter, but not the former, and in former we must use higher y coordinates).

To be able to write the code, I wrote "linear schedule" in excell I have switched among three orderings ... one in circuit logic, one in thread order logic and last in geometry logic.
First was used for planning "wires", second for debugging time dependences and third for codding.

Fortunately after few starting phases I have managed "in pauses" to place threads geometrically far from each other such that I neednot solve geometrical problems in later phases.
That would allow automation of rewriting the linear code to the plane code (I was lazy to code it, but that would definitely be good if one would decide continue the optimization).
Post Reply