TIS-100 | Programming puzzle game from SpaceChem dev & GAF's 77th Best GOTY 2015

I just built a solution to "Signal Pattern Detector" which actually uses every single available node, in an effort to break below the 3 cycles / output barrier.

After I finally got it to work It actually runs at 5 cycles / output :/

On the other hand, I'm pretty happy with my new & improved exposure mask viewer:
exposure62lz8.png


I really do like the image stuff best.

wow I thought I was doing well with 746. Any tips on improving my solution? http://i.imgur.com/BRCxSsE.jpg

Also stuck on how to do histogram better. ~3700 cycles so to improve on it I'm pretty sure I would have a to figure out a way to compare multiple bars together but I can't figure out a way to store it in memory
 
wow I thought I was doing well with 746. Any tips on improving my solution? http://i.imgur.com/BRCxSsE.jpg

Also stuck on how to do histogram better. ~3700 cycles so to improve on it I'm pretty sure I would have a to figure out a way to compare multiple bars together but I can't figure out a way to store it in memory

I have what's going to at least be within a few cycles of an optimal single-pixel-at-a-time solution for Histogram Viewer and it's 2467; doing much better than that definitely requires outputting multiple pixels per (x,y) send.

I've got a couple ideas for what to do on it, but I don't know if I want to take the time. Either you're bundling pairs (or I guess more) of inputs together or you're laying down whole lines and then maybe adding black pixels back in where necessary. I guess I could cheat out a much faster solution by checking if the first input is 8 and if so writing a bunch of lines on the bottom, since the first test takes so much more time than the others.
 
You guys that like the image tasks should hurry up and finish more levels. There are another bunch of image tasks in TIS-NET. Character Terminal in particular is a neat one.

Yeah but this probably requires more than a two second modification of the test pattern 1 solution.
 
You guys that like the image tasks should hurry up and finish more levels. There are another bunch of image tasks in TIS-NET. Character Terminal in particular is a neat one.


Yeah but this probably requires more than a two second modification of the test pattern 1 solution.

True, my 1169 solution for it is monstrous (
9
cores and
80
lines of code). Mathematically optimal, though.
 
About that...

image2wguh5.png


(
18
instructions btw.)

sadjim.gif


On a separate topic, has anyone else found the requirement to handle zero-length sequences in the sequence sorter really frustrating? My solution was flying through the sequences (okay, not exactly flying, but it was trudging along nonetheless), and then I'm hit by a stall with that zero-length sequence at the end of the first set. I'm basically going to have to re-think my entire approach, as I don't have enough space left to accommodate for it as a special case.
 
test_pattern_2_mk2.png


jimeyes.gif


And in a much improved
29
instructions, too.

Okay, I know I said the last one was optimal, but my calculations were off due to me being a moron (
I had realised you could skip the first black square at the start of every even line, but stupidly still writing a black square at the end of every odd line
). I'm now pretty confident that 1150 is the theoretical minimum, and 1151 is the practical minimum.

Edit: God damn it, in the time I was taking to find a suitable Jim gif mercviper manages to get in there before me.

Edit 2: And he's got a lower instruction count than me, too. Note to self: spend less time looking for snarky gifs and more time in TIS-100.
 
test_pattern_2_mk2.png


jimeyes.gif


And in a much improved
29
instructions, too.

Okay, I know I said the last one was optimal, but my calculations were off due to me being a moron (
I had realised you could skip the first black square at the start of every even line, but stupidly still writing a black square at the end of every odd line
). I'm now pretty confident that 1150 is the theoretical minimum, and 1151 is the practical minimum.

Edit: God damn it, in the time I was taking to find a suitable Jim gif mercviper manages to get in there before me.

In the same way that this is possible in image test 1, I'm pretty sure 1150 is also practical, but I can't think of how to implement it in test 2 just yet

CL7jkNF.png
 
In the same way that this is possible in image test 1, I'm pretty sure 1150 is also practical, but I can't think of how to implement it in test 2 just yet

CL7jkNF.png

You may be right, I'll give it another think tomorrow.

In the meantime, though, I did manage to get my instruction count on my 1151 solution to
19
, so at least I can go to bed clinging to the smallest of victories.
 
I really wish it had a way of displaying the three stats for each of the leaderboard entries so I could click on someone's cycle score and see the instruction and node count for that particular score. I tend to try to make the smallest programs with nodes and instructions (and still fail miserably at that) but my cycles are always quite high.

It'd at least give me an idea of where I might be going wrong if I'm trying to lower my cycles with five nodes and I see others are much lower using seven or eight, etc.

But this thread is a favorite to check in on because A) Without checking solutions I'm still picking up on some tips from non-spoilered conversation and B) It's the nerdiest one-upping I've seen in quite some time and that's fantastic. Someone coming in thinking they've reached the pinnacle of the lowest cycle count followed by someone with one cycle lower? Beautiful.
 
iPad version is pretty nice. One downside is although you get general stats on cycle count etc, you don't get friend counts (well maybe you do but none of my friends have it on iPad?). The upside is that means I'm not massively intimidated by everyone in this thread :)
 
Can we use some of the earlier levels to talk about tips and optimisation - basic stuff? Eg the differential converter I got down to 203 cycles like others here - but some have 127 cycles! How do you get it that low? I'm thinking there must be some optimisation in timing of read/write to reduce blocking but I've only just started so I don't have a feel for that yet.

I was wondering whether you could split it to run in parallel but the layout of the nodes doesn't seem conducive to that.
 
Can we use some of the earlier levels to talk about tips and optimisation - basic stuff? Eg the differential converter I got down to 203 cycles like others here - but some have 127 cycles! How do you get it that low? I'm thinking there must be some optimisation in timing of read/write to reduce blocking but I've only just started so I don't have a feel for that yet.

I was wondering whether you could split it to run in parallel but the layout of the nodes doesn't seem conducive to that.
I can give You two tips :)
You probably have a nod that is similar to this:
Code:
MOV UP, ACC
MOV ACC, DOWN
MOV ACC, RIGHT
Change it to
Code:
MOV UP, ACC
MOV ACC, RIGHT
MOV ACC, DOWN
You just won 2 cycles :)

I spent 2 hours yesterday learning how cycles work and just minute ago optimized my differential converter that was, like Yours, at 203 cycles. Now im at 175 cycles.
The key is to handle multiple streams and duplicate the outputs.
MOV LEFT, DOWN
is way faster
than
MOV LEFT, ACC
MOV ACC, DOWN

So if previous nods is like
MOV UP, ACC
MOV ACC, RIGHT

You will get a lot of cycles back if You use
MOV UP, ACC
MOV ACC, RIGHT
MOV ACC, RIGHT
and pass this data to the right node by
MOV LEFT, DOWN

I hope thats somehow clear :) Basically, when You pass the value to the nod is important, how You pass the value is also very important for low cycles scores.
 
I can give You two tips :)
You probably have a nod that is similar to this:
Code:
MOV UP, ACC
MOV ACC, DOWN
MOV ACC, RIGHT
Change it to
Code:
MOV UP, ACC
MOV ACC, RIGHT
MOV ACC, DOWN
You just won 2 cycles :)

Ah, because then the right node is processing the input while you're outputting down?


I spent 2 hours yesterday learning how cycles work and just minute ago optimized my differential converter that was, like Yours, at 203 cycles. Now im at 176 cycles.
They key is to handle multiple streams and duplicate the outputs.
MOV LEFT, DOWN
is way faster
than
MOV LEFT, ACC
MOV ACC, DOWN

So if previous nods is like
MOV UP, ACC
MOV ACC, RIGHT

You will get a lot of cycles back if You use
MOV UP, ACC
MOV ACC, RIGHT
MOV ACC, RIGHT
and pass this data to the right node by
MOV LEFT, DOWN

I hope thats somehow clear :) Basically, when You pass the value to the nod is important, how You pass the value is also very important for low cycles scores.

If you take a value from a node (eg mov left, down), does the source data disappear and resets back to zero? Or does it remain there unless replaced so you can reuse it?
 
Oh released on iPad. Praise the lord.

Edit: meh. While typing you lose the overview which is making you always switch back and forth between the typing and looking.
I would've preferred optional shortcuts for the single commands with some predefined label names so you don't have to pop out the whole keyboard.
 
Ah, because then the right node is processing the input while you're outputting down?
Yep, exactly
If you take a value from a node (eg mov left, down), does the source data disappear and resets back to zero? Or does it remain there unless replaced so you can reuse it?

When You use move left, down, then the value is just passing through node, it doesnt save anywhere, so if You want to reuse it in this node, You need to write to ACC first unfortunately.
Thats why You need to design around that.
 
Oh released on iPad. Praise the lord.

Edit: meh. While typing you lose the overview which is making you always switch back and forth between the typing and looking.
I would've preferred optional shortcuts for the single commands with some predefined label names so you don't have to pop out the whole keyboard.

I'm ok for now as a noob, but I wouldn't mind an update to keep the nodes zoomed out when you tap on them. Or let me scroll around when zoomed in.
 
Yep, exactly


When You use move left, down, then the value is just passing through node, it doesnt save anywhere, so if You want to reuse it in this node, You need to write to ACC first unfortunately.
Thats why You need to design around that.

if you pass through a value and need that one in the ACC register in the next node, you could also simply say "add left" for example. Don't know if this really saves you a cycle over writing it to ACC but it looks more clean to me. (Problem is you might have to reset ACC to 0 - but there are use cases :) )

@above. That would be good enough for me.
 
if you pass through a value and need that one in the ACC register in the next node, you could also simply say "add left" for example. Don't know if this really saves you a cycle over writing it to ACC but it looks more clean to me. (Problem is you might have to reset ACC to 0 - but there are use cases :) )

@above. That would be good enough for me.

ADD LEFT cost the same amount of cycles as MOV LEFT, ACC.
 
I don't find it too interesting to work on levels where I'm within 1 or 2 cycles of the whoever is first on my friend list (unless it's a very easy change). I think that optimizing the throughput in steady state with radically different ideas is a lot more rewarding than tweaking the startup time.

Of course, for some levels I've tried tons of radically different ideas and have nothing except highly complex, slow programs to show for it. (In fact, I recently managed to complete an insane solution for signal pattern detector... and it ended up at 125 cycles, exactly the same as the one I've had for a while)

About optimization, personally I enjoy discovering everything myself, so I'd appreciate if people spoiler-tagged any non-obvious stuff. Like this, which I think is absolute key:
doing JRO [port] is the only way to do a jump depending on another value in 2 cycles
.
 
When You use move left, down, then the value is just passing through node, it doesnt save anywhere, so if You want to reuse it in this node, You need to write to ACC first unfortunately.
Thats why You need to design around that.

One tip for those who do not know, you can use
a nearby node for temporary storage. Such as MOV UP LEFT, and in the left node have MOV RIGHT RIGHT, and then you can access it when you need to within your loop without having to resort to ACC or BAK.
 
One tip for those who do not know, you can use
a nearby node for temporary storage. Such as MOV UP LEFT, and in the left node have MOV RIGHT RIGHT, and then you can access it when you need to within your loop without having to resort to ACC or BAK.

I didn't know this is working. I thought about this but never tried it. Good to know :)
 
I didn't know this is working. I thought about this but never tried it. Good to know :)

Then you are missing half the fun in these type of games.

Hoping for something to work and then having it actually work is pure joy. :D

Always put those ideas into experiments, even if it doesn't work right away, it maybe useful somewhere else.
 
One tip for those who do not know, you can use
a nearby node for temporary storage. Such as MOV UP LEFT, and in the left node have MOV RIGHT RIGHT, and then you can access it when you need to within your loop without having to resort to ACC or BAK.

Writes being 2 cycles, though, this is probably equal to using SAV\SWP?
 
One thing I'd love about the iOS version is if it allowed you to sync with the PC version. I'm spending most of my time raking over and tweaking things on my iPad and then when if it comes together go run it on my PC to see how less pathetic my score is on the leaderboards.

Still the fun I'm getting is when my stupidly high cycle count approach comes down because I've looked at what I've written, noticed where it's inefficient, tweaked it or tried a slightly different approach and then seen my score come down, sometimes past the average scores too.

For example my Signal Multiplexer was something bonkers like 460 cycles where the average was 272 or there abouts. Rethought where I was going wrong (doing the same operation 3 times instead of just once) and got it down to the average score. But something was nagging me (well that and Durante's 176) so went back to my initial approach and instead of thinking about it programmatically (which I've limited experience) I looked at it like an electrical circuit (which I've a tad more knowledge) and hey presto a couple of hours trial and error and got it down to 204, and still 28 behind Durante :(
 
As a super amateur, it feels so weird to me that the commands to evaluate a condition execute the following instructions if the condition is FALSE. I'm straining my brain trying to put together this (likely poor) design for the signal multiplexer because I'm trying to do a two-step evaluation system on a single node.
 
Ok.

Btw: is there any easy virtual CPU where one could try to do some real assembler programming on? Maybe even something browser based?

When I did an assembly course in college 20 years ago they used MIPS because it's uses a small instruction set (RISC). The emulator we used (SPIM) is still around and still in use by college courses, crazy.
 
As a super amateur, it feels so weird to me that the commands to evaluate a condition execute the following instructions if the condition is FALSE. I'm straining my brain trying to put together this (likely poor) design for the signal multiplexer because I'm trying to do a two-step evaluation system on a single node.

In most real assembly languages, there are instructions to jump on false conditions. But recall that each jump instruction has something of an opposite instruction, so you can still think through it in your head mentally as though you have a true if-then construct and then reverse the instructions as necessary.

JEZ (Jump equal zero) <-> JNE (Jump not equal to zero)
JLZ (Jump less than zero) <- not quite the opposite of -> JGZ (Jump greater than zero)

When I did an assembly course in college 20 years ago they used MIPS because it's uses a small instruction set (RISC). The emulator we used (SPIM) is still around and still in use by college courses, crazy.

Heh, when I did assembly in college 10 years ago they used MIPS, but they had us write our own MIPS R2000 emulator along with it.
 
In most real assembly languages, there are instructions to jump on false conditions. But recall that each jump instruction has something of an opposite instruction, so you can still think through it in your head mentally as though you have a true if-then construct and then reverse the instructions as necessary.

JEZ (Jump equal zero) <-> JNE (Jump not equal to zero)
JLZ (Jump less than zero) <- not quite the opposite of -> JGZ (Jump greater than zero)

Oh for sure it's easy to build around it. It's just a stumbling block no matter what to think "Yes means No and No means Yes"

Also, my problem turned out to be trying build a new set of instructions around a few lines I kept from my first draft. It was so much easier just to start over and think through each step one by one.
 
Heh, when I did assembly in college 10 years ago they used MIPS, but they had us write our own MIPS R2000 emulator along with it.

I took a high level systems design course where we created a pipelined MIPS processor on an FPGA. That was probably my favorited course in University.
 
I completed "Stored Image Decoder".
(story spoiler)
The sequence that happens was extremely well done. Love it.

Afterwards, I built a fast stored image decoder. Then I built a faster stored image decoder.

storedimagev2rjo.png
 
0qLA8LU.png


Leaderboards are bad for sanity and sleep. Think I need to just play 3DS games until Dragon's Dogma PC comes out.

Someone coming in thinking they've reached the pinnacle of the lowest cycle count followed by someone with one cycle lower? Beautiful.

I'll never figure out how to squeeze 1 more cycle out of that stupid program.

This is the most insane program I made so far in TIS.

interruptfdsim.png

 
slowly grabbing a hold of parallelism, a concept I still haven't used in my undergrad and i'm 2 semesters away from graduation lol. Climbed my way to the top(tied with everyone else of course) signal amplifier because of it

edit: durante still feels untouchable, he's like the christopher robin of this game
 
Heh, when I did assembly in college 10 years ago they used MIPS, but they had us write our own MIPS R2000 emulator along with it.

I did Assembly two years ago, and yep, MIPS!

slowly grabbing a hold of parallelism, a concept I still haven't used in my undergrad and i'm 2 semesters away from graduation lol. Climbed my way to the top(tied with everyone else of course) signal amplifier because of it

edit: durante still feels untouchable, he's like the christopher robin of this game

I'm finding Gotchaeye even more out of reach than durante.
 
This game is pretty awesome. It makes me feel dumb as shit and my creations are probably pretty ineffective, but man does it get your brain working!
 
Top Bottom