July 6, 2010

Get to the light..

.. make BOT happy.

One of my favorite educational games is Light-Bot.
Its target is to navigate psychotic robot to light ball, let him make lite. This act bring happiness to robot. This also complete the game.

Level 10 split humanoids in two groups - 60/40, where 40 will newer pas it.
Who does it - programmers. More precisely - `can be programmer under favorable circumstances.


Top 15 solutions presented in no order.


  • All 10 level in under 45 MIN
    
    


Sent: joi 8 noiembrie 2012 15:45 
Received: 11/08/2012 04:31 PM






  • lb-88.png
  • if __name__ == "__main__":
        f1()
    
  • lb-105.png
  • lb-111.png
  • :- use_module(library(clpfd)).
     
    puzzle(    [[ 151],
              [U1],[U2],
            [40],[U3],[U4],
          [U5],[U6],[U7],[U8],
        [ X],[11],[ Y],[ 4],[ Z]], X,Y,Z  ) :-
     151 #= U1 + U2, 40 #= U5 + U6,
     U1 #= 40 + U3, U2 #= U3 + U4,
     U3 #= U6 + U7, U4 #= U7 + U8,
     U5 #=  X + 11, U6 #= 11 +  Y,
     U7 #=  Y +  4, U8 #=  4 +  Z,
      Y #=  X +  Z,
     Vars = [U1,U2,U3,U4,U5,U6,U7,U8,X,Y,Z],
     Vars ins 0..sup, labeling([],Vars).
     
    % ?- puzzle(_,X,Y,Z).
    % X = 5,
    % Y = 13,
    % Z = 8 ;
    
  • lb-114.png
  • lb-116.png
  • 117, 117-1 are same as 116 but have hiden bug in them.. Because they 117 :_
  • lb-117-1.png
  • lb-117.png
  • [-]>,+[->,+]<[.<]
    
  • lb-119.png
  • lb-125.png
  • I think, I understand this one.
    qsort []     = []
    qsort (x:xs) = qsort [y | y <- xs, y < x] ++ [x] ++ qsort [y | y <- xs, y >= x]
    
  • lb-126.png
  • fib = 0 : 1 : zipWith (+) fib (tail fib)
    fib !! 4
    
  • lb-131.png
  • lb-136.png
  • Program will take all available memory no matter what. Seriously, trying to be everything is not a way to success.
  • lb-190.png
  • Two light bull solution

  • Total inline strategy



  • high kinetic energy 

  • real proof that non programmer can do it


  • Carpenter: there 17 symmetries in topology. He used 6.  


  • Easy Test



No comments:

Post a Comment