Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- It's silly and pointless but there's a great game called factorio. In it there is a system of signals and logic-gate-like elements called combinators which can be combined to perform computations. Here I made a short and very laggy video showcasing a computer I made in it as well as the compiler I wrote in Haskell to turn code written in my custom language into programmed memory ready to be placed in-game:
- https://www.youtube.com/watch?v=NpaUyai1U64&feature=youtu.be
- I found the signals system very interesting because although the game runs only at 60Hz:
- 1) individual values are not 0s and 1s but 32 bit signed ints so there is a nice layer of abstraction
- 2) basic arithmetic and logic operations are provided by default and
- 3) computations can be massively parallelized as one combinator can compute 300 values at once if used correctly.
- This means that building a machine operating on whole vectors and performing linear transformations on it is relatively easy compared to the real world of transistors. Currently I use only 1 variable at a time but the endgame with this project is to use the superb support for linear algebra and build either a GPU or a neural network accelerator for the computer.
- Something like handwritten digit recognition could be performed in-game without any cheats or speedups in near real-time e.i. with a 1-2 seconds delay.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement