the problem with this game is not consider energy consuption. The best goal is do all tasks with a less movements of the bot, the comands is all the same.
@tuberpi In fact the real programmers try to use the least possible processor time, too many function calls which means more processor usage. There are too many steps in which the bot does things useless, which in a real programming situation, take up memory and processor, but for a game they really were thinking, excuse my english
I finished this a couple of hours ago. Good game. I'm guessing that you're aiming for the least amount of commands? I just played it without paying any attention, and ended up with some levels having only 1 or 2 spots left in the code. 5 stars ^_^
The last level should not work the way you did it. The bot should have jumped one more time and light down the last one so you should have needed to add 1 command to light it up again. I did it different way with 17 commands instead cause of the bot light down the last one. But apparently the way you put your commands bugged the game.
What matters is that a given subfunction completes. In this case, after jump + light. Just because F1 doesn't finish all the way doesn't matter. You can't end a level if your function itself is incomplete, but as F2 is quite short, there's additional versatility.
I don't get how the total amount of commands is calculated; if it's the number of things the robot does then it's grossly underperforming, but if it's the number of commands in the main then the first level would have been a function call, so it's not that either. So what is it?
But in real life programming, this is like saying: "let's see who can get the task done in least amount of code, regardless of performance of the outcome".
Not good in a programming sense, as demonstrated by many many levels in this video. There are many useless moves by the bot, but it offered the least amount of commands.
It is probably highly regarded for the management team, if they're paying per lines of code though... until they realize their product performs like crap.
You couldn't really do it the other way around though, count it by number of commands actually performed. Not the way the game is. It's a viable goal, even if it's not a realistic one.
As correct as your statements are, the point of this particular approach was to minimize total commands used. If I were after efficiency, that would be easy to do in this game (there's also no in-game metric for measuring it).
Man, thats some optimum solutions! I tried a simple recursion F1 calling F1 and saw it was disallowed so I didnt realize I could have 2 step recursion. Nice find. A computer generated search of an even lower solution would be an interesting challenge.
I got to 165 commands without using recursions since I didn't think infinite loops were allowed. Didn't realize there was a loophole! Thanks for the guide, now time to figure it out myself.
Recursion only works if the lights are lit at the end of the function's processing. If the functions still have leftover moves to perform, it'll perform those moves even if all lights are lit. It calls for some careful planning in certain cases (especially the last level)
lol and I saw my 171 personal record as a nice one...
Anyway I thought the stage did NOT automatically end once you lighted up every square, i.e. using recursion usually ends up with your bot looping indefinitely through the scenario switching lights on and off.
Looks like that's not your case. I guess I was wrong.
man how many hours did it get before coming up with these solutions?
i cant even get pass lvl10..
ngeksuss 1 week ago
how can you think this all?
anyway, thank you
TheFlyg0n 1 month ago
Comment removed
TheFlyg0n 1 month ago
That's truly a thing of beauty.
VK2XPT 9 months ago
btw.. I wonder how his brain works!
Shadowglimt 1 year ago
Omg! lvl 7!! Perfect! :D
Shadowglimt 1 year ago
the problem with this game is not consider energy consuption. The best goal is do all tasks with a less movements of the bot, the comands is all the same.
PedroJungbluth 1 year ago
Rofl, very nice. Never would've been able to use pure recursion for level 10 o_O
blitzforthewin 1 year ago
dude thanks you got me 30 points on kongregate
KILL3R56 2 years ago
thanks that helped so much :D
Tashepooh22 2 years ago
It is, stupid! You can't use recursion, like this one (esoteric solve for first level):
F1 = {Up, Light, F1}
but you can use recursion like this:
F1 = {F2 Up, Light, F1}
F2 = Null
Why, hell?
ELXenu 2 years ago
You are the best programmer EVAR :O!!!!!
tuberpi 2 years ago
@tuberpi In fact the real programmers try to use the least possible processor time, too many function calls which means more processor usage. There are too many steps in which the bot does things useless, which in a real programming situation, take up memory and processor, but for a game they really were thinking, excuse my english
wakazx 7 months ago
Wow, watching how you complete them versus what I did on some (especially 9) makes me realize how inefficient some programmers can be.
Sarstan 2 years ago
i actually have a video just like this except its like 5 minutes shorter :o and more simple
HowToGetBadges 2 years ago
This video is meant to be a move-count optimization.
KongRubix 2 years ago
This was very helpful to me. Thanks so much for posting this. *hugs*
RougeRoks 2 years ago
Wasn't this music in the first Mortal Kombat movie?!
MKChosen13 2 years ago
@MKChosen13 Hackers soundtrack
AlgaronGargatha 1 year ago
I did it with 180 commands
bowy2bob 2 years ago
I finished this a couple of hours ago. Good game. I'm guessing that you're aiming for the least amount of commands? I just played it without paying any attention, and ended up with some levels having only 1 or 2 spots left in the code. 5 stars ^_^
draconian2 2 years ago
thanks For video !!
91646227 2 years ago
Wow. Did you figure all of this out on your own? I wouldn't have the patience.. By the way, thanks for the solutions! They helped a lot. ;)
crazywoogle 2 years ago
I went through the whole game thinking I was supposed to optimize bot actions, not commands....it became impossible to do that perfectly on level 11.
sctriplefox 2 years ago
I don't understand the last level.
The last level should not work the way you did it. The bot should have jumped one more time and light down the last one so you should have needed to add 1 command to light it up again. I did it different way with 17 commands instead cause of the bot light down the last one. But apparently the way you put your commands bugged the game.
(WTB more level)
stalonedd 2 years ago
Incorrect
KongRubix 2 years ago
What matters is that a given subfunction completes. In this case, after jump + light. Just because F1 doesn't finish all the way doesn't matter. You can't end a level if your function itself is incomplete, but as F2 is quite short, there's additional versatility.
KongRubix 2 years ago
THANKS A LOT
Superg457 2 years ago
THANX ALOT DUDE
ameagle2111 2 years ago
Thanks your epic and i subscirbed to you. ^^
AQOwnage 2 years ago
woohoo 30 points! ty mr rubix..
frehut 2 years ago
are you joking me?!! i found this after beating game, my mind really is numb... lol oh well good job
nintendow1 2 years ago
god...yer a genious at everything arnt u? how old r u
TheShadowmin 2 years ago
yay easy 30 points on kongregate thx to you
Skysoldier681 2 years ago
thank you so much!
trishasan 2 years ago
Thanks Kong!
GH30wner 2 years ago
i dont understand the functions things
E4bangbangE4 3 years ago 2
thx man you helped me finish the game 30 points!!!!!!!!!!
RandomDude0321 3 years ago
Awesome! I didnt think to use a recursive function! (same as below =) )
popoknight1 3 years ago
ty i done the whole game on kong and got me a 35 points :)
jordaie1234 3 years ago
I found the 131 solution. How do I make the video? What program did you use to record the screen?
markbyers888 3 years ago
I would use the free trial of hypercam. google it
popoknight1 3 years ago
ty soooo much
elloh143 3 years ago
thank you soo much u helped me get 30 points on kongregate
edward650 3 years ago
T_T J'ose imaginer ce que type donne avec de la vrai programme. Niveau optimisation c'est le néant.
Zefling 3 years ago
i don't get the F1 and F2 thing
XxXxXamzXxXxX 3 years ago
I don't get how the total amount of commands is calculated; if it's the number of things the robot does then it's grossly underperforming, but if it's the number of commands in the main then the first level would have been a function call, so it's not that either. So what is it?
Patashu 3 years ago
Wait, wait, I think I have it...it's the number of commands total in main, f1 and f2, right?
Patashu 3 years ago
I think so, yes.
But in real life programming, this is like saying: "let's see who can get the task done in least amount of code, regardless of performance of the outcome".
Not good in a programming sense, as demonstrated by many many levels in this video. There are many useless moves by the bot, but it offered the least amount of commands.
It is probably highly regarded for the management team, if they're paying per lines of code though... until they realize their product performs like crap.
huanga 3 years ago
You couldn't really do it the other way around though, count it by number of commands actually performed. Not the way the game is. It's a viable goal, even if it's not a realistic one.
Patashu 3 years ago
As correct as your statements are, the point of this particular approach was to minimize total commands used. If I were after efficiency, that would be easy to do in this game (there's also no in-game metric for measuring it).
KongRubix 3 years ago
Man, thats some optimum solutions! I tried a simple recursion F1 calling F1 and saw it was disallowed so I didnt realize I could have 2 step recursion. Nice find. A computer generated search of an even lower solution would be an interesting challenge.
rbairos1 3 years ago
very elegant!
fgsethseth 3 years ago
Rubix, drugs are bad.
rushyrulz 3 years ago
AHHHHHHH
I got to 165 commands without using recursions since I didn't think infinite loops were allowed. Didn't realize there was a loophole! Thanks for the guide, now time to figure it out myself.
tynam 3 years ago
Recursion only works if the lights are lit at the end of the function's processing. If the functions still have leftover moves to perform, it'll perform those moves even if all lights are lit. It calls for some careful planning in certain cases (especially the last level)
KongRubix 3 years ago
lol and I saw my 171 personal record as a nice one...
Anyway I thought the stage did NOT automatically end once you lighted up every square, i.e. using recursion usually ends up with your bot looping indefinitely through the scenario switching lights on and off.
Looks like that's not your case. I guess I was wrong.
walen 3 years ago
zomg
Gunnar120 3 years ago
upside
Gunnar120 3 years ago
down
Gunnar120 3 years ago
writing!
Gunnar120 3 years ago
omg you deleted my comment :O I think..
MarkBallie 3 years ago
that helped me with 10 - 12 thanks.
MafoogleyProductions 3 years ago