Encoding items in Minecraft (1 of 5) - basic ideas
Vložit
- čas přidán 17. 12. 2022
- How to make a machine that takes in any Minecraft item and outputs a numeric code specific to that particular item (a bit like a bar-codes on grocery store items).
In this video series, we learn the math used to make such a machine.
Final map download: www.planetminecraft.com/proje...
Credit: @DatNerd who got me hooked on encoders. - Hry
I literally right now am designing a elevator that uses item-to-binary encoder. Looking forward to compacting my design!
Good timing then
I think the jargon in the earlier conversations (e.g. "token") may have been throwing my brain for a loop... they all suddenly make sense. Really appreciate your methodology and approach to explaining problem solving :)
One man's jargon is another man's intuition, to adapt an old phrase. I am interested to know though, are there any words with which you could label the idea of "number of 1's in a binary number" which lend themselves to your own intuitions?
My gut told me something like "weight" was an appropriate concept to lean on. I also considered "order", but felt like that could also be understood as the number of bits in the binary representation (sans leading 0s), so decided against it.
I then did a search of "number of 1's in a binary number" to test for any existing terminology and study of the mathematical concept, and found a comment in the OEIS describing it as "binary weight", and "Hamming weight" (A000120), which turn out to describe this exact thing (though it seems binary is a special case of the Hamming weight, which can have longer "alphabets" than [0,1]).
This said, now that I know what "token" conceptually refers to, it no longer presents an issue for my understanding. To add to this, I think a decent amount of my initial confusion was wrapped up in a general unfamiliarity with the encoding problem and my never having the benefit of a low level problem statement and motivation for investigation. Instead, I had access to already-abstracted perspectives, whose included terminology became the subject of my confusion (despite its usefulness in contexts other than my own). I can see why approaching the problem from a signal processing perspective would lend a different vocabulary, perhaps more focused on the actual signals themselves, where "pulses" or "signals" or "tokens" have physical meaning in a constructed system.
Very awesome, I like how you're going through all your design decisions so we can understand and follow.
As a software engineer, I can definitely appreciate this kind of problem and the approach/process to finding better and better solutions!
thanks. Walking through all the decisions like this also helps me get my head around whats going on.Teaching is the best way to learn sometimes. Like, I've found that a lot of programming bugs can be found just by explaining the problem to someone else, even if they don't say anything
@@whitestonejazz in software development we call that Rubber Ducking. You might see some Devs have a rubber duck or something on their desk, reminds them to stop and talk/think something through as though you we explaining your problem to someone, so often you solve your own issue like that.
Imagine doing this with the new calibrated skulk sensors and amethyst block + skulk sensor functionality. You would be able to send information down a single line. I imagine it working like Morse code or like IP packets in modern networking.
Genuinely looking forward to the double-chest-encoders :) Great explanation! Thank you!
you're welcome! There's some good connections to Pascal's triangle and binomial sums coming up
This video is amazing. Encoded tech is one of the more complicated fields of technical Minecraft and by making this series you are making it accessible to many more people. You have explained the concepts incredibly well and in an easily understandable way. Keep up the good work!
Thanks! that accessibility is exactly what I'm hoping for
never thought of doing coding in Minecraft.....nicely explained great work😀👍
thanks. finding ways to use higher math in Minecraft is my favorite type of content to make
Oh, man, this is fun I've been workin' on an encoder for a while now, and I'm always happy to see a good youtube vid on the topic.
You're trying to do it fast as a UI for a storage system?!?! Heck yeah, that was my application, I wonder if you'll come to the same optimizations I came up with.
This looks like an exciting series, definitely gonna watch it
there's a magic trick/puzzle that works similarly to this encoder (kind of). you have 5 cards each with 16 numbers on each card such that for example the number 25 will be on card 4 and 5. (these cards use 1 to 32, so the number represented by converting the cards to binary is one less to the number the participant picked). this trick works with Fibonacci numbers as well as with binary although the Fibonacci version is a little more involved to work out the number.
Your videos are entertaining and educational at the same time! That's quite rare on CZcams nowadays.
Really looking forward to see more of your work ;)
In earnest, that is one of the loveliest comments I've received as I look up to the same quality in all my favorite maths CZcams channels.
This is so interesting and would love to see someone smarter than me make a storage system or something like that with this, very cool and also great job presenting it it was very easy to understand and I cant wait for part 2!
Thanks. It's been fun for me myself to just explore all the math involved here
I canʼt wait to see whether this series does anything interesting with porkchops in particular.
(Why porkchops? Well, suppose you need to send the signal in a way where it might not be completely received correctly. Then youʼll want to be able to handle random bit flips, or at least detect them. And porkchops are very similar to ham, for Hamming code..)
It might be interesting for you to watch "How does Double (spot it) work?" By "Stand-up Math". Where explained interesting problem. I can't sure about it, but it's looks like you trying to solve similar question in this series
Oh I want to get you on bedrock so bad!!!! I love your thinking process. Doing a similar project (on and off atm) but instead using hex more directly, with redcoders. You got any plans to use hex at all?
Yeah, I just found mattbatwing's video on binary and hex in MC. Probably gonna spend some time in the 3rd or 4th video talking about hex conversion and databus stuff
Brilliant idea, really good explanation :)
Thanks; the main concept I learned from @DatNerd though. Part 3 of the series is where I'm really gonna be in new territory
Great video
pretty cool video!
thanks!
that comb pattern of the binary is really satisfying
Indeed it is. It's likely a very core pattern or fractal to the field of combinatorics in general. A lovely shape. I would love to know whether there's any connection between it and the Catalan numbers :-]
This. The hero we hoped for. Lets fucking go.
Thanks. I've done my best :-]
I have a suspension what the selutiom could be for the last problem you will talk about next time. Though i have no idea how you would convert this signal back to an item. I want to see more!!
Interesting video, well explained
I've been debating whether to cover decoding in this series. Video #2 will probably just cover chest-filter encoders up to a few hundred items. Then video #3 will cover the solution to the last problem, but applied to chest-filter encoders. Might also do a 4th video just covering interesting mathematical properties of encoders that aren't necessarily useful.
Im making a redstone shulker box loader (one for your enderchest) that fills up an empty shulker box, and once one item runs out, i want a request system to refill. This is just what i need for it to work!
Tho its 27 different items... Do you think one could make it work without filling more than if i just made 27 hopper filters?
I wonder whats the least amount of bits you need to to encode the most amount of items, while having only X amount of tokens?
-Is it only chance that with 5 available Tokens you need 5 bits to encode the maximum amount of items. or is that the answer?- (it was just random chance)
czcams.com/video/Q1lRxx2MukM/video.html remember to start using demibolts instead of normal bolts. A lot less effort for the literal same speed.
good point
@@whitestonejazz nice. Im liking it, your explaining is very clear
Next please!!!!
working on it. Had to spend a few days re-organizing the world to make some new concepts easier to make sense of
Hello WhiteStoneJazz, I'm a computer scientist in our Minecraft circles. I've actually been working on this same item storage application from a different angle. Let's chat! Maybe you can help with mine or I can help with yours!
Will do. You can look me up on discord. I'm on the TMC discord server, CubeKrowd, the slimestone archive, or scicraft all under "WhiteStoneJazz". Twitter works too
@@whitestonejazz found ya! thanks and talk to you soon!