Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

Prenton posted:

Yeah, that seems to be the "proper" way to do it. The main difficulty is on start-up, making sure everything is in phase despite 2 of 3 nodes not actually seeing any input yet.

The two ways I found round that after I got fed up with lockups:

The only real use of "ANY" I've found so far, priming them from another node: Like this

Rotate the program in the lower 2 checker nodes round, so they actually start with "wrong, emit false, wait for input"


What I did was just forward -10 a few times and then do the main value passing loop of mov left down or w/e.

This game is fantastic. I haven't even dove in to the later puzzles much as I keep going back to optimize my earlier ones.

Adbot
ADBOT LOVES YOU

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

Broken Cog posted:

Just got done with the Sequence Peak detector, and it was the first time in the game I ran into a problem where the row and storage limits in each node became an issue.


I'd love to see an actual clever solution to this one if anyone has it. I assume I could've used the "Faux register" method posted earlier, but I hadn't seen that post when I did this.

Caveat I'm not an expert or anything, but here are my tips. I'm especially interested in Peak detector as it's the level where my friends have the biggest relative score advantage over me so I've rewritten it several times in attempts to improve it.


1) This one more than most levels really can make use of that faux register pattern, fyi

2) You have lots of space, you should consider splitting up the logic much more if possible. For example split up:
- Spreading the values to the different pipelines
- Recognizing zero
- Comparing to the current min/max
- Storing the current min max

3) Reduce instruction repetition. I notice in your first node you repeat move down + move right (or right then down, equivalently) quite a lot. Some of those repetitions can probably be factored above the jez check.

4) I'm spoilering this, since it's almost cheating, but the jro command is by far the most powerful of them all. It allows you to create functions, and use your instruction position within a block as a second variable.

edit: 5) Little things count, such as ensuring you only jump when you have to, which is one instruction more than letting the code wrap around the bottom. So for this puzzle, zeros are less frequent than nonzeros, so make sure to use jnz so that once you're done receiving the new value you don't have to jump to the top, you only do that on the less frequent 0 inputs.



OK now for some example solutions. Here is my first one that I did the day I got the game:

The basic idea is I pass the current value and new value around twice, and throw out the result that I don't want.
The first thing you see is I'm not following tip number 4 yet. I'm also doing a lot in the second nodes. Both comparing with zero, communicating with the node that maintains the minimum, resetting that child node, and passing the final value down.

This solution is 375 cycles, not bad for a first try.

Here's number two

So this solution uses JRO. The first node splits the signal, and the second one checks for zero and sends the appropriate offset to the next node, which sits in the cmd label most of the time. You can save on jmp commands a lot by ordering your labels too. After a reset you will always save, and after a flush you will always reset. This solution still sends the value twice and discards one input depending on which is smaller.


I'm not actually too happy with it, even though it's 346, several cycles faster. I've gotten a 345, and the high score on my friends list is a significantly faster 295.


Anyways, hope this helps.



Does anyone have any scores they're really proud of? I am most pleased with my solutions for

Sequence Generator @ 101 cycles
Interrupt Handler @ 172 cycles
Sequence Reverser @ 286 cycles
Histogram viewer @ 2078 cycles
Window Filter @ 428 cycles and
Sequence Indexer @ 1195 cycles

Fuzzy Mammal fucked around with this message at 04:53 on Jun 16, 2015

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy
Ok I rewrote it one more time and got it to 329. Less passing of values around.

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

GuavaMoment posted:

Peak detector, 27 cycles. :smug: 363 for my non-cheaty solution
Exposure Mask Viewer: solved and 2nd on my friends' list somehow at 736 cycles. That was very close to being a Not Fun Level.

Nice. I have 569 on the mask viewer :smugmrgw:. I'm pretty stumped with the sorter though. I've tried several approaches and need to take a break.

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy
I'm finding editing lua super tiresome so I'll just post my ideas and hope someone else actually turns them in to puzzles:

- GREATEST COMMON FACTOR
- LOWEST COMMON MULTIPLE
- PATH AND STEER: Start at 0,0. One input provides -1 for turn left, 0 for continue 'straight', 1 for turn right, the other input provides the length of the next line segment. So you can do some sort of long overlapping connected series of lines.
- Bring back PRIME DETECTION
- RADIX MUTATION: Take a base-10 number and a new base. Output the digits of the number in the new base system one at a time.
- COMPLEX NUMBER MANIPULATION: Get a real and imaginary part for two numbers, output the real and imaginary part of their product / sum / whatever
- LOGARITHM: Take a number and output LOG2, LOG3, and LOG10 (?) of that number, rounding either down or up I'm not sure.
- PRIME FACTORIZATION: Given a number output how many factors it has of all primes between 2 and root n

I'm not sure of some of these are doable :)

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy

Trick Question posted:

How on earth do I fit a pattern detector into these teeny-tiny boxes? I've been cruising along but can't for the life of me conceive of how I'd do this.

Approaches include:

Making a one detector, a five detector and a four detector, then passing the inputs to them with various offsets.

Split the detecting and the action into two boxes, connected by a jro.

Jro the input itself and you can just fit the entire thing in to one box.

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy
I preordered the one with the manual :3:

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy
Oh man...



Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy
I won't spoil it but the amount of effort put in to this thing is unreal.

Adbot
ADBOT LOVES YOU

Fuzzy Mammal
Aug 15, 2001

Lipstick Apathy
It should open up in half an hour!

  • Locked thread