A game for programmers

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

A game for programmers

Post by Mordred »

User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: A game for programmers

Post by arjan.top »

I love it =)
BETA
Forum Commoner
Posts: 47
Joined: Fri Jul 25, 2008 3:21 am

Re: A game for programmers

Post by BETA »

:lol: cool man thx for da link :)
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: A game for programmers

Post by onion2k »

I must be thick or something. I blitzed through the first 9 levels and then hit a total wall. I can't just can't do 10.
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: A game for programmers

Post by arjan.top »

just look for duplication =)

spoiler!
http://shrani.si/f/10/et/15IbIMIq/lvl10.png
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: A game for programmers

Post by arjan.top »

wtf@lvl11 :D
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: A game for programmers

Post by onion2k »

Hmm.. Having looked at that spoiler I think the reason I can't do 10 is because it contains a lot of redundant 'code'. I don't do that in my scripts and I'm sure as hell not going to start just to complete a little game.
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: A game for programmers

Post by arjan.top »

onion2k wrote:Hmm.. Having looked at that spoiler I think the reason I can't do 10 is because it contains a lot of redundant 'code'. I don't do that in my scripts and I'm sure as hell not going to start just to complete a little game.
:lol: :lol: :lol:
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: A game for programmers

Post by arjan.top »

arjan.top wrote:wtf@lvl11 :D
not so wtf anymore =)

one last level ...
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: A game for programmers

Post by arjan.top »

lvl 12 is too easy :(
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: A game for programmers

Post by Mordred »

This is an example of coding with some extremely limited resource, a parallel from real life is with some microcontrollers that have limited code memory, but you hook your own external data memory (yes, these are not von Neumann architecture machines!). When you run out of code memory, you can implement a virtual machine, and load bytecode from data memory.

Anyway, my solution took 164 commands (first play got me 190), and once or twice I did some cool stuff with recursion ;)
There was one level that could be solved with a double recursion (f1 calls f2 and f2 calls f1) but this was two commands longer than the iterative solution :/

Here are the non-trivial levels, see if you can beat me ;)
http://mordred.logris.org/devnetwork/lightbot-164.jpg
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: A game for programmers

Post by arjan.top »

Mordred, exactly same solution for level 11 :)
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: A game for programmers

Post by josh »

Reminds me of playing with lego mindstorms robot things
Post Reply