typodupeerror

## 16-Year-Old Creates Scientific/Graphing Calculator In Minecraft160

Posted by Soulskill
from the holy-smokes dept.
New submitter petval tips another amazing Minecraft project: a functioning scientific/graphing calculator. "On a virtual scale, the functional device is enormous — enough so that anyone in the real world would become a red blot of meat and bone staining the road if they fell from the very top. Honestly, his virtual machine looks more like a giant cargo ship ripped from a sci-fi movie than a working calculator. Yet type your problem out on the keypad, and the answer appears on a large white display mounted on the side of the monstrous brick structure." The creator says it can do "6-digit addition and subtraction, 3-digit multiplication, division and trigonometric/scientific functions ... Graphing y=mx+c functions, quadratic functions, and equation solving of the form mx+c=0." We've previously discussed the creation of a 16-bit ALU in Minecraft.

This discussion has been archived. No new comments can be posted.

## 16-Year-Old Creates Scientific/Graphing Calculator In Minecraft

• #### Amazing stuff (Score:3, Informative)

on Monday March 26, 2012 @05:38PM (#39479381)
This is a really fantastic accomplishment. More than I've ever done in Minecraft.
• #### Re: (Score:2)

More than most have done. More, indeed, than a billion flaming wool wangs.
• #### Re: (Score:2)

Indeed. I don't know if I'll ever be able to play Minecraft again now :(

• #### Nicely done sir (Score:5, Insightful)

on Monday March 26, 2012 @05:41PM (#39479411)
Well, if these games can get younger people interested in the concepts of programming, I'm all for it. I'm not a fan of most online games, but I have to say this is really cool. I think more games should provide an environment to explore programming (optionally of course)
• #### Re:Nicely done sir (Score:5, Informative)

on Monday March 26, 2012 @06:32PM (#39479801) Journal

Just to clear something up (in case someone else has never played it)... Minecraft is not an online game. It's a Java based game with a massive procedural generated world full of blocks that can be moved around. It has multiplayer aspects and a dedicated server, but they are not required for play.

• #### Re: (Score:2)

I have to assume this kid probably had some prior programming interest before taking on this project.

If not, that's even more hardcore (and this whole thing really is quite insane.. ).

• #### Re: (Score:2)

You can create some stuff at least in OpenTTD too: here's a neat 7-segment LED counter [youtube.com] made with trains.
• #### For those of us who don't know... (Score:4, Interesting)

<tasos...laskos@@@gmail...com> on Monday March 26, 2012 @05:45PM (#39479447) Homepage
...what Minecraft is, can someone explain why that calc is an accomplishment?
What's the difficulty of doing something like that? What elements do you have available? Do you have logic-gates, math functions, full-blown scripting, or what?
• #### Re:For those of us who don't know... (Score:5, Informative)

on Monday March 26, 2012 @05:50PM (#39479499)
Minecraft is a sandbox type game where you can build stuff out of the environment. It has no scripting or math functions built in, nor does it really have any sort of logic gates built in. However, it does something called "redstone dust" which you can use as wires. The wiki explains more, but you can hand-craft logic gates out of it: http://www.minecraftwiki.net/wiki/Redstone_Dust [minecraftwiki.net]
• #### Re: (Score:1)

by Anonymous Coward

In the basic game, which it looks like he is using, you get NOT gates. From which, as we know, all of computing is derivable. By arraning the "wires" and "torches" you build NOTs, then ANDs, then NOR etc etc etc

There is a form of cheating everyone uses in these endeavors which is a copy/paste mechanism for duplicating substructures, as well as unlimited resources (whereas in the survival game you have to collect ores while fending off zombies and skeletons and farming for your dinner).

• #### Re: (Score:2)

By arraning the "wires" and "torches" you build NOTs...

Which leads to my question, this appears to show that he's using pure binary logic; meaning this calculator is not an analog machine like the ALU (if you saw that vid it looked to me like the operator had to run to each part of the logic and flip a lever or light a torch or something), in this it looks like he's using the "wires" to carry actual signals around the logic. This look like a minecraft model of actual signal-bit operations. Am I getting this right?

• #### Re:For those of us who don't know... (Score:5, Informative)

on Monday March 26, 2012 @06:38PM (#39479853) Journal

It's binary... the redstone has a delay when you go through some of the gates and repeaters which makes it look a bit analog, but the logic is all binary. The torches can be used as repeaters (torches power redstone up to 16 blocks) and/or carry a bit signal up or down in elevation in the world. You cannot put redstone wire on the side of multiple block so you have to use stairs (space intense) or torches (compact) to change elevation.

• #### Re: (Score:2)

Ok, THAT is pretty cool. The ALU took a looong time to get it to do an anything, honestly I wasn't impressed with it. Anyone can take a collection of objects (rocks, twigs, small pets) and use them as place holders and perform logic operations with them. This however is a true digital calculator.
• #### Re:For those of us who don't know... (Score:5, Informative)

on Tuesday March 27, 2012 @04:04AM (#39482355) Journal

It takes a long time because the game is essentially a 3D cellular automation. When you flip a switch, for example, the block it sits on is "powered" - then it takes one update cycle for that "power" to travel up to 16 blocks, then at least one more update cycle for the next 16 blocks, etc. Any object that's not wire (like the components in a logic gate) adds at least one more cycle worth of delay. It adds up quickly.

Redstone was really intended for simple mechanisms like switch activated doors and other very simple, local interactivity. But people have really taken it to the limits of the game. Basically you're building logic gates and digital circuits out of discreet relays!
=Smidge=

• #### Re:For those of us who don't know... (Score:5, Informative)

on Monday March 26, 2012 @06:40PM (#39479873) Homepage

Basically, he's created an ALU found on a CPU, but operates like something Charles Babbage would have made. Even the gates for memory are mechanical, the input and output are all mechanical too. Truly amazing!

• #### Re: (Score:3)

You're thinking of NAND gates (or NOR gates, which have the same property).

• #### Re: (Score:2)

Each Redstone block can have up to 6 input/output combinations (ie, 5 inputs, 1 output, or 2 inputs 4 outputs etc) making each one an up-to-5-input NOR gate. As we all know, a 1-input 1-output NOR gate is simply a NOT gate.

• #### Re: (Score:2)

Basically logic gates [minecraftwiki.net]
• #### Re: (Score:3)

.What's the difficulty of doing something like that? What elements do you have available? Do you have logic-gates, math functions, full-blown scripting, or what?

It really depends on the mods you have installed. There is a mod out there that has single blocks for all the basic logic gates. But it's much harder then scripting. If you want to script something first you have to build a chip that understands the script, THEN write the script.

• #### Re: (Score:2)

It has a very primitive system with a set of odd rules and behaviours that can be exploited. Ultimately the only thing you are really given easily is a NOT gate. Doing something like this has two primary challanges:

- the logic of the thing itself
- translating it into "minecraft" logic and working within the restrictions imposed

The system is built around blocks being powered/unpowered .. with different game blocks powering blocks around it in different patterns, and other blocks responding to that power in d

• #### Re: (Score:2)

No, you have a NOR gate. Redstone torches on the side of a block can have multiple OR inputs and negates the input.

• #### Re: (Score:3)

Minecraft is basically a 3D cellular automata simulator. You set cells to different values ('materials') and then in the next update cycle their properties will change depending on their value and the values of their neighbours. Because cellular automata of this nature are Turing complete it is possible to implement any kind of computer in Minecraft. Because of the visual representation of the blocks, it is possible to create visual representations.

This is no more of an achievement than creating a graph

• #### Re: (Score:2)

...what Minecraft is, can someone explain why that calc is an accomplishment? What's the difficulty of doing something like that? What elements do you have available? Do you have logic-gates, math functions, full-blown scripting, or what?

basically, it's a primitive PC, using blocks that move to perform calculations.

Think of a calculator, and when you click 2 + 4 that 2 button is connected to a box that has 2 blocks in it that fall and when you click the 4 button another 4 blocks fall from another box. The + then puts those 6 blocks together in a box, and then.... erhm, magic happens, and something figures out the total is 6 and displays a 6 on the screen.

You could do this in real life with enough blocks and something the size of a s

• #### Transcendental functions (Score:4, Informative)

on Monday March 26, 2012 @05:45PM (#39479457)

Anyone know how he did functions like logarithms, trig, etc.? I didn't watch the whole video.

• #### Re:Transcendental functions (Score:4, Insightful)

on Monday March 26, 2012 @06:02PM (#39479593)
Video doesnt explain, but probably he uses taylor series. [wikipedia.org]
• #### Re:Transcendental functions (Score:5, Informative)

on Monday March 26, 2012 @07:42PM (#39480381) Journal
For logs, it is easier and faster to [1] convert the number to binary (2^x) (1.yyyy). Save the power x for later. For the other number 1.yyyy, break the number down to [binary] (1+0.a)(1+0.0b)(1+0.00c)... Where a, b, and c are binary digits. There is an algorithm like a single binar divide that will generate a,b,c all at once . Then for every nonzero a, b, and c... you look up the log-base 2 and sum those together. That will give you the binary digits to the right of the decimal. The number to the left is the power of 2 from the first conversion.
• #### During trig/calc class... (Score:5, Funny)

on Monday March 26, 2012 @05:45PM (#39479459)

...I created games on my TI-82 graphing calculator, so I guess turnabout is fair play...

• #### Re:During trig/calc class... (Score:5, Funny)

on Monday March 26, 2012 @05:59PM (#39479579)
Now the challenge is to go back and recreate Minecraft for your TI 82. Then try creating a graphing calculator within that.
• #### Did it without RedPower2 addon (Score:5, Interesting)

on Monday March 26, 2012 @05:47PM (#39479473) Homepage Journal

There are lots of addons that help with redstone wiring. The premiere one is probably RedPower2. In addition to giving unit-sized gates, latches, and flip-flops, it also gives buses, which can carry 8 bits of data along a single line.

I just can't believe that this is all done without addons. Even building a BDD (Binary to Decimal Decoder) is difficult in Minecraft, and translating that to display the correct digits is complex. I don't mean "complex so that a child couldn't understand it", but complex as in taking a lot of clock cycles. There are only 20 ticks per second in Minecraft, so all these operations quickly add up to a lot of time.

In addition to binary/decimal conversions, and the logic for doing complex operations (dividing is very hard), this calculator even has typesetting. When you have a power, it places the the displayed value as a superscript! Radicals are drawn over values for the SQRT operations!

In essence, I'm a bit skeptical about this. I believed it when I first saw it a few days ago, but the more I think about it, I think it's all staged. I'm curious to see what others think.

As far as my own redstone experience: I've done far more than the average minecraft player, including building adders and counters, but haven't ever attempted any mega projects.

• #### Re: (Score:2)

He must have used some kind of addon, though, since the numbers on the "buttons" and being able to "push" them by stepping on them as he did aren't from the vanilla game.

I'm skeptical as well, but I'd certainly be happy to be proved wrong, because that's quite an accomplishment if it's legit.
• #### Re: (Score:3, Informative)

This is explained in the video, the "buttons" are re-skinned wooden pressure plates, so he has to walk on the to activate.
• #### Re: (Score:3)

er, shouldn't that be: the "buttons" are "wooden pressure plates" he has to "walk" over in the "activate"? Nothing in this demo/conversation should lack quotes!

• #### Re:Did it without RedPower2 addon (Score:4, Informative)

on Monday March 26, 2012 @06:25PM (#39479753)
The description states that he used a custom texture pack, nothing more. In this pack he made a bunch of iron blocks with text on them. He also made Wooden pressure plates invisible, and had placed them over the 'buttons'. Pretty ingenious.
• #### Re: (Score:1)

by Anonymous Coward

the wiki clearly states how to make assembly code gates. how to extend using repeaters etc... and 16 year olds usually have a large amount of free time.
http://www.minecraftwiki.net/wiki/Redstone_Circuits [minecraftwiki.net]
using an addon might make it easier but i have seen people waste more time.

• #### Re: (Score:2)

It's not fake, I have seen people build simple CPU's in Minecraft before. This is just an extension of those efforts. The only barrier to creating it is the simulation limit of the redstone in Minecraft itself. Which is why the machine is 3D and not 2D.

And there are many more of those

• #### Re:Did it without RedPower2 addon (Score:4, Interesting)

on Tuesday March 27, 2012 @11:19AM (#39485531)

I've built some ALU's and prototypes of CPU's, here is some grandstanding of my TMS1000 clone: http://www.youtube.com/watch?v=t82p-Ql8Djo [youtube.com] The thing is though, while I am an older guy, I went from zero knowledge to this in under 6 months in minecraft. Binary logic is just not that hard. Its just really really repetitive.

After the hundreds of test projects I built, I have a good judge on the amount of logic you need and I have to say, the kid knows his shit. He is basically using 3 shift registers and a shift ALU. That is, he is only calculating one digit at a time with bits hold carry/overflow flags. Notice how he said it was a 6 bit BCD adder? That is JUST enough bits to calculate 9x9 with one bit over for carry. This is why those cheap 99 cent solar calculators are so cheap, it has about the same kind of logic in them. If you build your logic around needing to shift, everything is smaller and easier. It might be slower, but it properly takes longer to cycle the display than to multiply a number. Also, its so small is because he doesn't have a big ass ram bank. 9/10 cpu projects usually are big because of even a bank of 20 registers.

On the mine craft side of things, he uses pressure plates as they look a bit nicer and generally its an easier interface to wire. There is this is/was a big design stuff in the forms about dot matrix displays so I figure he put in his own display stuff there. The only thing I am not impressed with is the "graphing" part of his calculator. Lets face it, the entire core of the thing is a 6 BCD adder with shift logic. This thing is WAY to small and far to limited memory for it to have nothing but static formulas. Also, why didn't he put in a simple clock to just "draw" the grid instead of pressing a button?

But to be honest this is WAY better than that stupid HACK alu. I AM impressed with the original guy who made it, just not all the 100's of clones people have made of it. Very few people have made a 100% working cpu. Anyone can build an ALU, no one builds the state/decoding logic:P

Look at his older caculator, you can see how small the basic logic is there and how much you need for the display:P http://www.youtube.com/watch?v=aSC_YXuONZg [youtube.com]

• #### ob xkcd (Score:1)

by Anonymous Coward

Lesson two: implement this: http://xkcd.com/505/

• #### That is infskcredible (Score:2)

Really. That is one smart kid with a lot of time, talent, willpower and attention for detail. Kudos to the guy/gal that accomplished it.

• #### Level editor? (Score:2, Interesting)

Is there a level editor for Minecraft or did this guy just waste a few years of his life? Also, this is not really different from other CA circuits of which there are far more awesome [quinapalus.com].

• #### Re:Level editor? (Score:5, Informative)

on Monday March 26, 2012 @06:02PM (#39479591) Homepage Journal

There is an editor. Nobody does these projects in game, it's literally impossible (not enough game ticks per second * time minecraft has been out to accomplish the builds).

• #### Re: (Score:2)

A common tool is to use WorldEdit while in-game.

It allows loading 'schematic' files into game directly, copy-pasting and all sorts of things for building complex stuff.

• #### 1222221? (Score:4, Funny)

<Like2Byte@@@yahoo...com> on Monday March 26, 2012 @05:58PM (#39479567) Homepage

Calculating something that said '5318008' would have been so much cooled. sigh.

Seriously, this is simply freakin' awesome! Nice job, MaxSGB.

• #### Cute, now go learn FPGA design (Score:2, Insightful)

It's impressive in the sense that this guy created a fairly simple "computer", using a limited game environment (Minecraft), running on a virtual machine (Java), running on a physical machine (PC/Mac). In other words, he's spending a million CPU cycles to simulate a single gate in the most roundabout way possible.

I'm impressed that someone with that much patience and functional intellect is wasting so much time in Minecraft, when they could be learning actual chip design. I'm impressed that bragging right

• #### Re: (Score:2)

This this this. If you're going to go through all the trouble to do it in minecraft, why not do it on some CPLDs. You probably won't get as much internet fame, but you'll e able to show that off on the job/college hunt!
• #### Re: (Score:2)

The guy who made the 16-bit ALU in Minecraft supposedly received a job offer over his video. I wouldn't assume that this kind of project is useless for finding a job\college.
• #### Re: (Score:2)

I seem to remember it was for a generic "We're making an MMO" type place, not anything related to hardware design though
• #### Re: (Score:2)

So what? I'm guessing that working on an MMO is that guy's dream (or one of them).
• #### Re: (Score:2)

Because its more fun to futz around with objects in a video game than to plod through the workflow necessary to get from an idea to a completed circuit board populated with the aforementioned logic devices, I/O ports, etc?

• #### Re:Cute, now go learn FPGA design (Score:5, Insightful)

on Monday March 26, 2012 @06:11PM (#39479649)
Considering the amount of research and understanding that it took to build this thing, I highly doubt this was a "waste of time". Also, it is an awesome showcase of his abilities to future employers and colleagues. You could argue that he could have built a real calculator from transistors instead but that would probably take money that a lot of 16 year olds simply do not have.
• #### Re: (Score:1)

by Anonymous Coward

In other words, he's spending a million CPU cycles to simulate a single gate in the most roundabout way possible.

No, "the most roundabout way possible" would involve running that Java virtual machine on a Javascript-emulated 6502 processor [visual6502.org] (and there's really no limit to how many other layers of emulation you could stack on, especially considering that our whole physical universe is most likely a simulation itself).

• #### Re: (Score:3)

I'm guessing you're the kind of person who grumbles about people playing rock band when they could be learning to play the actual instruments.
• #### Re: (Score:3)

Also someone who only approves of hobbies that satisfy his sensibilities. How dare this 16-year-old not go out and buy a breadboard with a bunch of simple TI chips and FPGAs to built a Cray. Madness!

• #### Re: (Score:3)

If you mean designing an FPGA, then maybe that can wait until after college EE/device physics courses, and getting a good start on boolean logic and computer architecture is a enough for a high schooler.

If you mean designing for an FPGA then frankly this is much more impressive -- while designing for the fixed-size logic tables and routing patterns of an FPGA presents its own challenges it's practically utopia for someone who has worked within the limitations of Minecraft. I'm sure he'd have no problems ad

• #### Re: (Score:2)

I agree - FPGA designing would be easy after Minecraft!

He can even use my quick and dirty course in FPGAs [hamsterworks.co.nz] if he wants...

• #### Re: (Score:2)

Not everyone has the same values as you. Perhaps he just does not care about doing it in real life. Or maybe his interest in minecraft spurred his interest in creating the calculator. Maybe his next step is indeed doing FPGA design? Just enjoy the creation for what it is. :)

• #### Re: (Score:2)

Well said!
• #### Re: (Score:2)

He's 16 years old. Perhaps this is the first step in him learning chip design? Or maybe you think 4 year olds should be ridiculed and scorned because they're wasting their time learning the alphabet instead of just reading Lord of the Rings.

Seriously, if you're that bitter about wasting your life, maybe you should go and do something with it, instead of wasting time on slashdot jealously projecting onto people who are actually trying to fulfill their potential.

• #### Autism (Score:5, Funny)

on Monday March 26, 2012 @06:18PM (#39479705)

Autismï is a hell of a drug.

• #### Next, VHDL to Minecraft. (Score:2)

I'm kind of disappointed. When I started watching the video, I thought someone had built this with moving parts in Minecraft But it's just a big collection of wired logic. It's not like you can see the parts move.

So hook up a VHDL compiler to the Redstone 2 Minecraft compiler. There are CPU designs available in VHDL. [coledd.com] Generate a real CPU in Minecraft.

The cool CPU I'm waiting for is Babbage's Analytical Engine. [plan28.org] The guy who says he's building a replica hasn't made much progress yet. Babbage's design

• #### Somewhat impressive (Score:5, Interesting)

on Monday March 26, 2012 @07:05PM (#39480077)

A friend of mine (who's 15) and myself (I'm 28 with a CS degree) have a nearly working programmable 8-bit computer in Minecraft. ALU is done, all 256 bytes of memory are done, the instruction tape (made out of sand and glass, much like a punchcard) is done, etc. Another 20 someodd hours and we'll have all of the components connected together and the whole CPU completely done. It actually isn't as hard or take as much time as it may sound.

The most impressive thing about this video is that he did all of the math in BCD rather than just running it on a CPU. I already have multiplication (Booth's algorithm) and other operations programmed on our instruction set (we wrote an assembler and emulator outside of Minecraft to work out the kinks). I'd rather do the complex operations in software rather than laying gates and logic in the hardware.

I don't see how he has enough room for displays of that size. You'd need NxM worth of latches to sustain the pistons that drive the pixels as well as the appropriate muxers to select which pixels are turned on. Our 256 byte memory array is bigger than his entire calculator so I'm a bit skeptical that he isn't using some addons.

• #### Re: (Score:2)

I suspect he is doing some trickery with the display. That is, its not a true dot-matix display. Also this thing is using a sift BCD adder, I doubt he has more than 16 bytes in the entire thing. See the propagation delay in the final result? I don't even think he latches the registers. Also on 1:24 you see his decoder, He only has a single 5 row encoder (32 charters max). I suspect he has a shift register at the back of the display, the symble comes in, gets decoded and shifts onto the display. Rem

• #### Easier than some... (Score:5, Funny)

on Monday March 26, 2012 @09:07PM (#39480811)
The thing to be noted from this is that Minecraft is an easier IDE to use than Eclipse.
• #### Is MaxSGB an American? (Score:2)

A lot of people are telling me that Americans are too stupid, and lazy, for high tech.

#### Related LinksTop of the: day, week, month.

Bus error -- please leave by the rear door.

Working...