Artificial Inteligence in ComputerCraft - NeuralNetworks
#81
Posted 10 November 2015 - 05:08 AM
#82
Posted 10 November 2015 - 05:13 AM
#83
Posted 10 November 2015 - 07:12 AM
Creator, on 10 November 2015 - 05:13 AM, said:
And a quote from the MC forums:
Quote
(1:1),Stone,278532
(1:3),Stone,269447
(1:5),Stone,293764
(3:0),Dirt,334311
(13:0),Gravel,88583
(14:0),Gold Ore,3611 (9.03 ore per chunk, +10%)
(15:0),Iron Ore,38577 (96.4 ore per chunk, +25%)
(16:0),Coal Ore,74691 (186.7 ore per chunk, +31%)
(21:0),Lapis Lazuli Ore,1490 (3.73 ore per chunk, +9%)
(56:0),Diamond Ore,1376 (3.44 ore per chunk, +10%)
(73:0),Redstone Ore,10567 (26.4 ore per chunk, +6.4%)
Edited by H4X0RZ, 11 November 2015 - 12:19 PM.
#84
Posted 10 November 2015 - 07:48 AM
#85
Posted 11 November 2015 - 06:03 AM
oops i didn't even see the conversation from my second post, i mean the numbers when you tell it the first input is 1400 and the second is 1000 it simply replies with a number <1 and i just can't figure that one out like i said i think its probability but of wut?
Edited by Rougeminner, 11 November 2015 - 06:04 AM.
#86
Posted 11 November 2015 - 06:29 AM
#87
Posted 11 November 2015 - 06:31 AM
The idea is that by teaching it a great variety of inputs and associated outputs, it should eventually catch on to whatever pattern it is you're following and start to produce the right outputs for inputs you haven't shown it before, without having to be shown the expected outputs at all. But there has to be a pattern to the numbers you're feeding in, as feeding garbage in will only get you garbage out.
(Think of it as being like teaching a person - show them how to hammer a red nail, then show them how to hammer a green nail, and odds are they'll have a pretty good idea what to do with blue nails before you tell them.)
For example, with something like TicTacToe, there are just two rules to follow ("make lines of three" and "don't let the opponent make lines of three") - but there are so few moves that're actually worth making that it's easier just to teach a network all the best moves (each one being simple) than it is to try and teach it those rules (which are relatively complex).
With something like waifu2x (an NN-based image upscaler), things get a bit more complex. There are TONS of patterns - certain alignments of pixels should result in certain other alignments of pixels, based on which other alignments of pixels are nearby, and so on. By saving (lots of!) high-res images in low-res and feeding the pairs in as the expected outputs and inputs respectively, a correctly setup network (someone's got to translate the numbers for it!) should eventually be able to produce decent looking high-res images from low-res ones without ever seeing the original high-res versions (dead handy if you didn't have the originals in the first place!).
#88
Posted 11 November 2015 - 08:02 AM
#89
Posted 11 November 2015 - 08:39 AM
myNet.feedForward({1000,100})
myNet.backProp({.5})
it should learn that 1000,100's output should be five?
(its me thats learning not the AI)
#91
Posted 11 November 2015 - 09:53 AM
Rougeminner, on 11 November 2015 - 08:39 AM, said:
myNet.feedForward({1000,100})
myNet.backProp({.5})
it should learn that 1000,100's output should be five?
(its me thats learning not the AI)
The dlidea is that you give many examples so the AI can find a pattern and react accordingly.
#92
Posted 11 November 2015 - 11:38 AM
#93
Posted 11 November 2015 - 12:11 PM
The net has this configuration: 2 4 1
Then then in puts and outputs look like this
0 0 : 0
1 1 : 0
1 0 : 1
0 1 : 1
After passing these inputs a few hundred times, the network will learn.
#94
Posted 11 November 2015 - 12:17 PM
Rougeminner, on 11 November 2015 - 11:38 AM, said:
//Kinda-Off-Topic
IIRC you asked what the stuff I posted meant (or how to utilize it).
In the quote you can see how many blocks of an ore are found in one chunk (±some percent). Using the chart you can see on which "layers" it's more probable to find a specific ore.
That *should* allow you to tell your "AI" 1. on which layer a specific Kind of ore can be found and 2. how many blocks of that ore appear.
Although this isn't too usable when mining for multiple ores at the same time, it should allow you to get one specific ore "fast". (Like skipping chunks you already farmed n-blocks.)
Edited by H4X0RZ, 11 November 2015 - 12:18 PM.
#96
Posted 11 November 2015 - 12:32 PM
Creator, on 11 November 2015 - 12:11 PM, said:
Then then in puts and outputs look like this
0 0 : 0
1 1 : 0
1 0 : 1
0 1 : 1
oh and one more thing, i tried doubling the net configuration myNet.Net({4,8,2}) and this didn't work so well, what did i do wrong? is it the two output neurons?
also words don't explain how stupid i feel... i went back and looked at NN had i taken the time to look i would have noticed that thats an XOR
Edited by Rougeminner, 11 November 2015 - 12:56 PM.
#97
Posted 11 November 2015 - 12:56 PM
#98
Posted 11 November 2015 - 01:09 PM
#99
Posted 11 November 2015 - 01:36 PM
If i convert the input text from read to ASCII numbers for example A OK is 65 79,75 and i put them together like so
myNet.feedForward({65,7975}) -- this is A OK in numbers
myNet.backProp({71797968}) -- this is Good in numbers
then i could interpret it back to char's and then have a texting AI? is this a valid concept (correct me if i got the numbers wrong please)
#100
Posted 11 November 2015 - 01:49 PM
Also, some users have voted they didn't find this implementation good. I'd like to know what you didn't like, so I can optimize/change the code.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











