Tendency display

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Deggial_68
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Jan 06, 2025 1:38 pm
Contact:

Tendency display

Post by Deggial_68 »

I got bored watching the contents of the tanks to evaluate their trends.
Does it fill up? Does it drain?
So I decided to over-engineer it and create a game logic capable of doing so for me.

I am mostly inexperienced with logic networks and struggled quite a bit with the task, but I finally came up with this solution:



Please tell me what you think about it!
Can it be optimised?

Has it been done already?
I'm sure it has.
But I couldn't find it online.
Besides, where's the fun in that anyway? ;)

(Usage: Connect the module under the power pole to whatever you want to track. The logic is parametrised, so you can choose whatever you want to track. Is there a way to solve this without parametrization?)
Tertius
Smart Inserter
Smart Inserter
Posts: 1562
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Tendency display

Post by Tertius »

You did a direct and simple approach, however you need a large amount of combinators.

If you calculate the raising and falling level every tick, you don't need any memory cell, but you get much noise. So you need some kind of moving average to smooth out noise.

You can use a Kalman filter (linear quadratic estimation) for estimating the raising and falling level within some time interval.
I gave it an interval of 60 ticks (1 second).

The left 2 combinators are calculating the fluid level difference from tick to tick, so we get a positive (raising level) or negative (falling level) number every tick.
The right 3 combinators are the Kalman filter, also known as an improved version of a moving average filter that smooths noise. It averages the differences over time.
02-10-2026, 14-54-45.png
02-10-2026, 14-54-45.png (155.64 KiB) Viewed 212 times
Deggial_68
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Jan 06, 2025 1:38 pm
Contact:

Re: Tendency display

Post by Deggial_68 »

Thank you, Tertius, for your reply!

Oh well, I knew there must have been a better approach!
"Direct and simple" you write.
Well, it didn't feel like that to me! :lol:

But as I have solved the problem myself now (at least in principle and I am proud about it), I am glad to use your way better solution with a "Kalman filter" ... whatever this is. ;)
So thank you for sharing!
Post Reply

Return to “Combinator Creations”