View Stats:
wrOngplanet Jun 23, 2021 @ 3:43pm
Procrastination (TIS-100 Spaghetti Coding) (Some spoilers)
"Integer Series Calculator" (revisited)

I just wanted to test out this idea I had for the "Integer Series Calculator". Not even my most efficient solution (and not a particularly good one either), but I spent far more time on this one. Also I'm kind of stuck on other puzzles, so I revisited some old ones instead (slow day).

It's more an exercise in cumbersome program logic but what else is new for TIS-100 :P

I didn't bother spoiler anything, as it's such a mess anyway. With comments. Enjoy (or not)!

Btw thinking about it just now, it could be helpful to see the program flow "at a glance" a little better if the arrows outside the nodes indicated if they are used, and in which directions (not just from reading the node programs). Used directions could be say highlighted in bright white, while unused dark gray. I mean used at all, not just when running single-stepping. Maybe indicate deadlocks with red arrows while running.

Since I'm at it (IE procrastinating) I made a mockup of that idea as well :)


Just a thought. Maybe overkill, and I guess it's not much point in feature requests now anyways.

EDIT: Changed title a bit. Twice.

EDIT2: So, (finally) reading that Best Practices guide right here on Steam, I realize that it's not really a "jump table" I use in the above code. I guess it's more like a switch case statement (or maybe a mixture?). No biggie. Just FYI.
Last edited by wrOngplanet; Jul 11, 2021 @ 1:25pm
< >
Showing 1-15 of 20 comments
wrOngplanet Jul 3, 2021 @ 7:47pm 
"Sequence Gap Interpolator" (I'm just gonna continue this thread with more useless stuff).

What a mess lol! I almost had it, one value came out wrong on test 2. So naturally I just check for when that value is the output, and correct it.. ofc, there's another value that actually is that value, so then I had to account for that, hoping there wasn't more of those things.

My brain is all scrambled now, I'm sure I don't need 4 SWP instructions in that one correction node... oh, and a delay loop elsewhere as there were no way of communicating across a full node.

But it works! Well, some times. May fail on random test :-)

1622 / 6 / 80 (I'll have to revisit this some time and redo it from scratch. Maybe).


6 puzzles left. Idk, these are really hard. I solved the last one already (Wave Collapse Supervisor), which had a cool little ending when solved.

Apparently another hidden puzzle as well left.

EDIT: Thought I should include my mess of a solution for completeness sake. Removed other screenshot.
Last edited by wrOngplanet; Jul 7, 2021 @ 5:51am
Eye of Newt Jul 4, 2021 @ 11:06am 
Wow, that Integer series code! Fearsome indeed :P

I need to dig up the results I got from my TIS-100 game since I think I maaaay have managed to implement the series adder without using as many nodes, heh.
wrOngplanet Jul 4, 2021 @ 12:30pm 
Yes that turned out to be a bit of a beast!

I forgot to write the scoring, it got 3002 / 10 / 107. It's based on dividing by 4 in the equation 2N(N+1)/4. I still had to divide by 2 in there, so I'm a bit surprised it still beat my other one based on N(N+1)/2, but it did (That one got 3758 / 6 / 59).

The best I made was a simple add-up thing but parallelized 4-ways (2373 / 10 / 58).

(then there's those crazy records in that reddit thread... I have not idea how they do that! :p)

EDIT: Oh, and I did try for least cycles btw.
Last edited by wrOngplanet; Jul 4, 2021 @ 12:32pm
Eye of Newt Jul 4, 2021 @ 12:45pm 
The interesting thing is that this really shows the trade-offs you have to make in more complicated real-world computers where you can parallelize a task but you may run into race and stall conditions, or you may have to use more disk and memory space in the interest of speed.

So in your case, implementing Gauss's trick is faster but at the cost of complexity :)
Last edited by Eye of Newt; Jul 4, 2021 @ 12:46pm
wrOngplanet Jul 4, 2021 @ 1:12pm 
That too, like unrolling a loop for example (or partially unrolling it for a compromise or if you don't know the loop count exactly).

But specifically about TIS-100, what also amazes me in a way is that you can hit this brick wall "Can't be done in 15 lines" (just need one more lol). Or some other limitation, the extremely limited "memory" or the instruction set.

But it can be done ofc, it's just something you're missing, which seems impossible at some point. Like a new way of solving it, somehow. But if we had say 16 lines instead of 15, at least I would probably be happy with those solutions not thinking it could be done differently (or bothered to).

Which btw might have been okay when I think about it, ppl would optimize it anyway :P Ofc I get it's more of a puzzle and not a realistic system, and you got to have some limitations (no fun otherwise).

I've probably spent far too many hours on this game and it's starting to get embarrassing lol. But just 5 puzzles left now, can't quit now :)

(plus that hidden puzzle).
wrOngplanet Jul 4, 2021 @ 2:27pm 
Originally posted by Eye of Newt:
So in your case, implementing Gauss's trick is faster but at the cost of complexity :)
Reading comprehension... I kind of skipped this line.

That was my hope, but it kind of wasn't in this case. But still faster than the other non-parallelized solution though. But the simple adder was better, since it could be parallelized.

(Side-note, after all this time with TIS-100 and I still mistake LEFT for RIGHT or vice versa. As in real life lol).
Eye of Newt Jul 4, 2021 @ 4:35pm 
Originally posted by Scifikomori:
(Side-note, after all this time with TIS-100 and I still mistake LEFT for RIGHT or vice versa. As in real life lol).

Believe me, I've typed more than a few MOV LEFT ACCs when I meant MOV RIGHT ACCs. I blame all those nodes ;-)

(Luckily I don't mess them up IRL which is good because I do drive a vehicle!)
wrOngplanet Jul 5, 2021 @ 6:25am 
Originally posted by Eye of Newt:
(Luckily I don't mess them up IRL which is good because I do drive a vehicle!)
I do to some times, and I remember taking the wrong turn in a driving lesson. It's a little while ago now though. Maybe a little longer than a little while perhaps. Time flies and all that. Still haven't mistaken the clutch for the accelerator, so far so good :)

"Signal Exponentiator"

This solution I like for how it works, but it's not particularly efficient (it doesn't like zeroes though but luckily there were none).

I know nobody is interested lol, but here goes:

IN.A to the IN.B-th power. It starts simple by just adding IN.A number of 1s, then storing intermediate results in the node to the right. Then using that result for the next series of additions IN.A times, except the "next step" result is already there now, so consecutive additions are IN.A - 1 times, with IN.B number of intermediate results. Or something like that.

Btw some pen-and-paper approach really helped figuring out a system. Ok so exponents aren't complicated, but surprisingly not easy when only using addition (and TIS-100...)


(I also included my messy Gap Interpolator "solution" in its post above btw)
Last edited by wrOngplanet; Jul 5, 2021 @ 6:30am
Eye of Newt Jul 5, 2021 @ 11:32pm 
"Signal Exponentiator"

This solution I like for how it works, but it's not particularly efficient (it doesn't like zeroes though but luckily there were none).

I think I accidentally wrote one - you can see it in another thread somewhere :P
wrOngplanet Jul 6, 2021 @ 1:04am 
@Eye of Newt: I saw :)

"Prime Factor Calculator" (Continuing on to my eventual failure of finally completing this game).

Looked forward to this one, I just had to sort it out before tackling it. The 3 puzzles I got left however... well, I'm currently completely at a loss for how to solve them!

Anyway, I'm happy this worked. It's not efficient or anything (basically just for fun). I have no idea how to optimize it anyway atm.

It's based on the fact that prime numbers clusters around 6n-1 and 6n+1 (except 2 and 3), but not all of those numbers are primes. So there's a few wasted cycles eventually, but not until 25 (which is not a prime). It still works as their factors will be tested earlier anyway.

9033 / 9 / 77


EDITS: Figured I might as well post my solution. Other stuff (grammar etc).
Last edited by wrOngplanet; Jul 6, 2021 @ 8:09am
wrOngplanet Jul 6, 2021 @ 8:09am 
2 more to go!

"Sequence Mode Calculator" (I am not fond of this one! Talk about a brick wall!)
"Spatial Path Viewer" - All failures so far.. (same as above, not tried as much though. That 15 line limit...)

Just solved the dreaded "Prolonged Sequence Sorter", finally :-)

2531 / 6 / 44

I would never have made it were it not for my so-far failed attempts at "Sequence Mode Calculator", which gave me the idea of a completely different approach.
wrOngplanet Jul 6, 2021 @ 4:26pm 
From a few days ago :P

Not a solution, maybe some ideas? I don't know if it's possible to do with one node (I doubt it).

wrOngplanet Jul 7, 2021 @ 2:56am 
100_PERCENT_V2 :claptrap:


Sequence Mode Calculator: 3900 / 7 / 88
Spatial Path Viewer: 4842 / 9 / 95

But what a mess, delay loops and spaghetti jump tables to the rescue!

I finally found the hidden puzzle! I'm really bad with taking hints, but all the spoiler I read about it was that there were hints in the manual and in the achievements. That it was :eaglederp:

Not solved that one yet though... It's like I got 100%, but not quite :P

EDIT: Forgot the scores

EDIT2: When is this game "done"? Have to sneak in an improvement on the "Spatial Path Viewer". It now clocks in at 1491 / 11 / 99.

EDIT3: And another one, last one (again) (I seem to have come to an optimization blockage anyway :P): Spatial Path Viewer: 1382 / 6 / 76
Last edited by wrOngplanet; Jul 10, 2021 @ 8:47am
wrOngplanet Jul 7, 2021 @ 5:27am 
Aaaand DONE!

Only 6 years after release :P

I have to admit a small cheat hint on that last (hidden) puzzle. One of the output values were completely baffling to me. Being slightly impatient to finish, I found what type it was supposed to be (no solutions or anything), and then it was easy. Slight facepalm, but I'm okay with it. Very okay, finally done! :-)

With a slight headache and ear pain these last few days, nothing else to do (I don't think this was helping though...)

I feel I have spammed my own thread more than enough, which I never really do, but here we are (or I am). I'll show myself out now!

Screenshot of that last TIS-NET Directory page for conclusion (hidden puzzle not included):

Last edited by wrOngplanet; Jul 7, 2021 @ 5:28am
Eye of Newt Jul 7, 2021 @ 6:47pm 
Sweet :D NGL I'll probably be coming back here for hints on solving those puzzles if I get too stumped ;-D
< >
Showing 1-15 of 20 comments
Per page: 1530 50