Skip to content

Instantly share code, notes, and snippets.

No. Size Target Score Details
-------------------------------------------------------------------------------------
1 37 x 1 36 0.22222 Racer reached goal at ( 36, 0) in 8 turns.
2 38 x 1 37 0.24324 Racer reached goal at ( 37, 0) in 9 turns.
3 33 x 1 32 0.25000 Racer reached goal at ( 32, 0) in 8 turns.
4 10 x 10 10 0.40000 Racer reached goal at ( 7, 7) in 4 turns.
5 9 x 6 8 0.37500 Racer reached goal at ( 6, 1) in 3 turns.
6 15 x 7 16 0.37500 Racer reached goal at ( 12, 4) in 6 turns.
7 17 x 8 16 0.31250 Racer reached goal at ( 14, 0) in 5 turns.
8 19 x 13 18 0.27778 Racer reached goal at ( 1, 11) in 5 turns.
@m-ender
m-ender / ppcg-vr-testrun
Last active August 29, 2015 14:03
Full test run with all submissions and all test. This includes only one run for probabilistic submissions, whose scores have been determined separately. Any sort of KeyboardInterrupt indicates that I aborted the test run due to exceed the memory limit.
Racer by nneonneo
Running '.\submissions\nneonneo' against .\benchmark.txt
No. Size Target Score Details
-------------------------------------------------------------------------------------
1 37 x 1 36 0.22222 Racer reached goal at ( 36, 0) in 8 turns.
2 38 x 1 37 0.24324 Racer reached goal at ( 37, 0) in 9 turns.
3 33 x 1 32 0.25000 Racer reached goal at ( 32, 0) in 8 turns.
4 10 x 10 10 0.40000 Racer reached goal at ( 7, 7) in 4 turns.
5 9 x 6 8 0.37500 Racer reached goal at ( 6, 0) in 3 turns.
@m-ender
m-ender / ppcg-vr-tie-breaker-generator
Created July 2, 2014 12:44
I'm using this Mathematica snippet to generate tie breaker tracks based on the given tie-breaker. I sometimes need to add or remove a few more rows/columns to/from the boundary to ensure square sizes. Otherwise the track is used as is.
res = 290;
Riffle[
(*remove road cells around the border*)
(Drop[#, 4]) & /@ (Drop[#, -4] &) /@ Most@Rest@
ImageData[
Binarize@Rasterize[
Import["path\\to\\tie-breaker.pdf"],
ImageSize -> res + 8
]
] /. {0 -> "#", 1 -> "."},
You will probably want to run make manually here
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "clawpack.riemann.acoustics_1D" sources
{AAAAA:{00:{BBBBB:{00:{CCCCC:{00:{DDDDD:{00:{EEEEE:{00:{FFFFF:{00:{GGGGG:{00:HHHHH,10:{GHHHH:{32:{HGHHH:{32:{HHGHH:{32:{HHHGH:{32:HHHHG}}}}}}}},20:{GGHHH:{14:{HHGGH:{32:{HHGHG:{32:HHHGG}}}},32:{GHGHH:{14:{HGHGH:{32:HGHHG}},32:{GHHGH:{14:HGGHH,32:GHHHG}}}}}},30:{GGGHH:{14:{GHHGG:{32:{HGHGG:{32:HHGGG}}}},32:{GGHGH:{14:{GHGHG:{32:HGGHG}},32:{GGHHG:{14:{GHGGH:{32:HGGGH}},}}}}}},40:{GGGGH:{32:{GGGHG:{32:{GGHGG:{32:{GHGGG:{32:HGGGG}}}}}}}}}},10:{GGGGG:{00:{FHHHH:{32:{HFHHH:{32:{HHFHH:{32:{HHHFH:{32:HHHHF}}}}}}}},10:{FGHHH:{14:{HHFGH:{23:{HHGHF:{23:HHHFG,}},32:{HHFHG:{23:{HHGFH:{23:HHHGF,}},}}}},23:{GHFHH:{14:{HFHGH:{32:HFHHG}},23:HFGHH,32:{GHHFH:{32:GHHHF}}}},32:{FHGHH:{14:{HGHFH:{32:HGHHF}},23:{GFHHH:{23:HGFHH,}},32:{FHHGH:{32:FHHHG}}}}}},20:{FGGHH:{05:{GHHFG:{23:{HFHGG:{32:HHFGG}},32:GHHGF}},14:{FHHGG:{23:{GFHGH:{05:HHGFG,14:{GHFHG:{14:{HGHFG:{14:HHGGF,}},}},23:HGHGF,32:{GFHHG:{14:GHFGH,}}}},}},23:{GGHFH:{05:HFGHG,14:{GHGHF:{14:{HFGGH:{14:HGFHG,}},}},23:HGFGH,32:{GGHHF:{14:GHGFH,}}}},32:{FGHGH:{14:{FHGHG:{23:{GFG
@m-ender
m-ender / domino-gates.md
Last active August 29, 2015 14:04
A bunch of logical gates simulated with a setup of dominoes in ASCII representation.

OR

|||||/
      /
       |||||
      \
|||||\

AND

These are all possible propagation rules (along with their rotated and mirrored equivalents):

D|   ->    DD             D-   ->    D-

D\   ->    DE             D/   ->    DC

C|   ->    CD             C-   ->    C-

C\   ->    C\             C/   ->    CC
@m-ender
m-ender / rpn2.f90
Created July 28, 2014 10:10
Normal and transverse Riemann solvers for shallow water equations on a quadrilateral grid.
! =====================================================
subroutine rpn2(ixy,maxm,meqn,mwaves,maux,mbc,mx,ql,qr,auxl,auxr,wave,s,amdq,apdq)
! =====================================================
!
! # Roe-solver for the 2D shallow water equations
! # on a quadrilateral grid
!
! # solve Riemann problems along one slice of data.
!
! # On input, ql contains the state vector at the left edge of each cell
function z(y,_,$)
{
M=[];
N=[];
O=[];
C=1792814437;
P=72;
r=t=0;
(
f=function(a,k,L)
@m-ender
m-ender / N10
Last active August 29, 2015 14:10
Benchmark sets for a PPCG challenge: http://codegolf.stackexchange.com/q/42181/8478.
50
1 1 1 4 1 1 3 3 4 3
1 1 4 3 4 4 1 1 2 3
1 2 2 3 4 4 2 1 4 1
1 2 3 3 2 1 4 3 1 4
1 2 3 4 2 4 2 2 4 2
1 3 3 1 3 1 4 1 4 1
1 3 3 4 2 4 2 1 1 1
1 3 4 3 3 1 4 2 3 2
1 4 1 1 3 2 4 1 3 2