Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    32
  • comments
    5
  • views
    8698

neuro-hash [edit4]

Sign in to follow this  
polyfrag

1159 views

This is probably the last big idea I had, if I can't dig up others.

It started here: https://www.gamedev.net/topic/676377-local-hash/

Since then, I developed it more:

https://github.com/dmdware/lm15

https://github.com/dmdware/lm16

http://23.226.230.153/lm12/

[edit] The "pencil" source code is now available here (with a working CentOS 7 makefile so far only): https://github.com/dmdware/pencil

[edit] The "testfolder" with the exe and resource files is here: https://drive.google.com/file/d/0B2Wuir9-DSiURWxpd09YblNIT28/view?usp=sharing

And got some results by accident when I was attempting to write a "psychodeloscope" (basically a neural network that would process an image, or a camera capture, as if it's sensing, and the microphone etc, into one array of bits, and through several layers and convolution, and half of the array being hidden, so there is essentially double the amount of bits needed for all input and output, and produce an image on the screen, its "face", and sound, etc). I made a mistake at one point, in how to write expanding circles from the center of the screen, that were necessary, for something I forget, but basically it would actively "dream", by trying to produce an output, that would try to achieve a desired result, with a hidden layer or something with part of the next frame's input containing the prediction of the result of the world, which it would then map to the previous input (hidden and otherwise). The hash or brain would be like a learning algorithm that advances to the next possible combination of bits, skipping all the previous attempted configurations and any in between that don't work for that last mapping and any previous (this can be done iteratively, to make it faster, so that only the last mapping is considered, not all the history of them, so that, say, over 15 years, it might learn slowly like a child). Being functionally complete, and having enough layers (which turned out to be too high, make the idea unusable, except for maybe image manipulation effects as a plug-in in image editting programs perhaps, and may other uses like sound effects), it would be able to turn any output into any output, with consideration of the hidden layer it uses to "talk" to itself. I got an interesting effect. The effects for the bit-twiddling / bit-shifting were so nice, I thought they make a great album cover or are currency-quality like. They were just attempts to apply the mapping to frames from a movie and images. Some of them look like "the fourth plane of hell" or something. I used one of them as the wallpaper and art for my phone. I think there's more images on that page above, not sure, too lazy to check. I also had an idea to make a "dreamhub.com" kind of like a "DreamTube" where people would upload games or videos encoded in the neural format, so others can play it forward, or play around with it. There might be a use for these hashing algorithms as an image storage and compression format, or a video one.

IMG_4774.png

IMG_4775.png

IMG_4776.png

IMG_4778.png

IMG_4779.png

IMG_4780.png

IMG_4781.png

IMG_4782.png

IMG_4784.png

IMG_4785.png

IMG_4786.png

IMG_4787.png

IMG_4788.png

IMG_4789.png

IMG_4790.png

IMG_4777.png

Here are the different hashing algorithms I tried (rather the operations in the hash):

NAND:

[attachment=36119:D!D 1/2 D,D 1/4 D 3/4 Do N?DoNEURD?D 1/2 D? D,D. 2016-09-06 03-05-05 nand.png]

NAND version 2, with only 3 operations, not involving a second mask (I don't know what that means, reading from my own notes, but I remember trying to use two masks and two bits of input, instead of just two inputs and one mask, for one output):

[attachment=36120:D!D 1/2 D,D 1/4 D 3/4 Do N?DoNEURD?D 1/2 D? D,D. 2016-09-06 03-07-41 nand2 only3ops, noinvolvingsecmask.png]

NAND-NOR combination, seems broken:

[attachment=36121:D!D 1/2 D,D 1/4 D 3/4 Do N?DoNEURD?D 1/2 D? D,D. 2016-09-06 09-20-29 nandnorseemsbroken.png]

NOR, good:

[attachment=36122:D!D 1/2 D,D 1/4 D 3/4 Do N?DoNEURD?D 1/2 D? D,D. 2016-09-06 09-21-48 norgood.png]

XNOR (the original one, later found to be functionally incomplete just by itself, although it also had a NAND, but was then superfluous because it had extra levels required for a full amount of mappings, though it did produce the interesting image effect results above):

[attachment=36123:D!D 1/2 D,D 1/4 D 3/4 Do N?DoNEURD?D 1/2 D? D,D. 2016-09-06 09-25-25 xnor funcincomplete.png]

I also made a "pencil" app on CentOS, that used a NAND hash and you assigned the masks, and the behavior, whether it fed back on itself, whether it was supplied an increasing counter integer, or whether it got a timestamp each time to use as input:

[attachment=36124:D!D 1/2 D,D 1/4 D 3/4 Do N?DoNEURD?D 1/2 D? D,D. 2016-08-31 06-19-34.png]

[attachment=36125:D!D 1/2 D,D 1/4 D 3/4 Do N?DoNEURD?D 1/2 D? D,D. 2016-08-31 06-25-08.png]

lm8d.png

09j09.png

[attachment=36128:09j09 (DoD 3/4 D?D,N?).png]

levelasd000000.png

level0000000000000000.png

level0000000000000144.png

level0000000000000288.png

level0000000000000432.png

level0000000000000576.png

level0000000000000720.png

level0000000000000864.png

level0000000000001008.png

level0000000000001152.png

level0000000000006192.png

level0000000000006336.png

frame000008701.png

level0000000000003456.png

level0000000000003024.png

level0000000000010512.png

[edit] More:

lm8.png

lm8a.png

lm8b.png

lm8c.png

[Edit] an eg image encoding using the hash could work by mapping the 24-bit pixel index to map to the 24-bit RGB value and the number of bytes would be stored in the file header, or the hash can be mapped to output the color values (maybe in a hidden layer or not) as output to the previous input.

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!