Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Golf: Cabbage, Goat, Wolf

by Athanasius (Archbishop)
on Jan 06, 2014 at 02:06 UTC ( [id://1069442]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! perl
    use strict;
    ...
        printf "Completed moves right (%03b | %03b)\n", $left_bank, $right
    +_bank     if DEBUG;
        return 0;
    }
    
  2. or download this
    $_=q*H=([7,0]);c(7,0);y`0-4`-cgw`,say FV;sub c{(P,R)=@_;%OPP-=O;R+=O;i
    +f(R==
    7){ZV,O;return 1}if(P==3|P==6){WY}ZV,O;l:%QRP+=Q;R-=Q;F(H){if($_->[0]=
    +=P&$_
    ->[1]==R){XYl}}ZH,[P,R];if(R==3|R==6){XpopH;Y}ZV,Q;c(P,R)&&return 1;Xp
    +opV}W
    popV}}*;s=%(.)(.)=F$1(0..2,4){Yif$1&&!($2&$1);=g;s~F~for~g;s!W!P+=O;R-
    +=O;!g
    ;s^X^P-=Q;R+=Q;^g;s+Y+next +g;s#Z#push#g;s@([O-S])@\$$1@g;s&(H|V)&\@$1
    +&g;eval
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1069442]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-26 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found