a guest Nov 22nd, 2019 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 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:
  5. I found the signals system very interesting because although the game runs only at 60Hz:
  6. 1) individual values are not 0s and 1s but 32 bit signed ints so there is a nice layer of abstraction
  7. 2) basic arithmetic and logic operations are provided by default and
  8. 3) computations can be massively parallelized as one combinator can compute 300 values at once if used correctly.
  10. 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.
  12. 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.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!