Neural Network Development

Welcome! As the title suggests this is about creating a neural network, an adapting AI!

Now I’ve already done most of the research and I think this is possible, I just lack the motivation to work on it. So I’ll post my workings here for you guys to work together and figure this out, I can answer any questions you have but anything in general about AI itself Google it or find a video. Kids these days don’t know what a search bar is. So here’s an explanation about one part of it, Forward Pass.

Taken from my guide I wanted to make on the subject

Neural Networking is a machine version of our human brains. Like our brains, they contain neurons, parts of the code which uses weights and biases to put importance on tasks. These neurons are assigned into layers, called the Input layer, Hidden layer, and Output layer.

Uses
Before I even get into what happens here, what even is the use for neural networks? Like I said, neural networks is a machine version of our brain. This means that we can give the machine values from the game to help it make real time decisions. For example, in a kingdom game where you look after resources such as happiness, money, food, and construction, AI can decide which actions are most important at times where they need to do an action. If we can make advanced AI, it can lead to player vs bot games other than simple sentries. Beside this, AI can learn our personality and use that to stylize the game to our liking. However that form of learning belongs in unsupervised learning, where we are doing supervised.

Beginner Level

  • Input Layer
    This is the start of the system, it is where you input information about certain aspects. For example, if you were making an AI to tell dogs and cats apart, you might give ear and tail lengths for the AI to examine.

  • Hidden Layer
    This is where most of the magic happens. It’s where the math is implemented to calculate a value to be passed on to the next layer. This would be where the AI would grab those tail and ear lengths and make work of it. It would use those input values along with separate weights and biases in each one to make another number.

  • Output Layer
    Just like it’s name, this is where the output goes. After all the math is done, the AI might output a number between 0 and 1. It then compares it’s two values (one output was under the assumption it’s a dog and the other is done under the assumption it’s a cat). It would then see which number is larger and make it’s prediction. [1]

Mediocre Level

So what math exactly happens here?

No math happens in the input layer, so the calculations only begin in the hidden layer. What happens is that each input is multiplied with it’s own weight, and has bias added to it.

weighted_sum = (input_1 * weight_1) + (input_2 * weight_2) + (input_3 * weight_3) + bias

Then after this, we pass it through a sigmoid function which basically condenses the number into a decimal between 0 and 1.

Sigmoid can be thought of as 1/1+e^-x where x is the weighted_sum I wrote in the equation above. This equation doesn’t change, each neuron goes through the same calculation. The only difference is that for future neurons, their input is the sigmoid output from past neurons. An important thing to note is that each neuron starts with a randomized weight and bias that can be between -1 to 1. The reason for this is to allow for learning within the AI, like specialization for more complex actions to help it decide better for it’s course of action.

Now, this is actually it for calculating going forward. The real math will happen for backpropagation, when we have to find our error and update the weights and biases to make the AI smarter in it’s decision making. For now, we can begin with the first part.

If you read that congratulations you now know some of the basics of how this works. Anyways, reason I’m making this topic in the first place anyways is that I had to revise my system at least twice with dramatic changes. So what I’m about to tell you is by far the most memory efficient option at least theoretically.


The Idea

Basically, we want to do the most intense amount of concatenation known to Gimkit kind. The idea is to make what I’d like to call “Hubs” to store all the information for us to withdraw. If you read my explanation above you know what the “Inputs” and “Weights” are. I was thinking of making properties that hold certain number of weights per input and they are separated by certain characters like &[insert weights here]& or something like that so the AI can withdraw them for its calculations. If that sounds confusing, good that’s why I decided to post this. This isn’t for everyone so if you don’t think you can offer anything of use don’t reply and only post something meaningful. Anyways, as one who is bored of this place I won’t be the one to actively work on code unless summoned [2].

That’s most of it, anyone with a question about backpropagation, which if you’re curious I can explain at a later time, just Google it.

Uh, good luck.

By the way, I had some notes written but they’re on a different computer I can’t access right now, so give me a couple more hours and you’ll get some more information on the topic. If you flag this I don’t care just wondering if anyone was curious on this.


  1. I will provide an example soon enough, but since the network is really complex, I need to explain more concepts or terms before I can give you an example. ↩︎

  2. not an excuse to start pinging me ↩︎

12 Likes

how will you have enough memory?

4 Likes

Character limits are exceedingly high, so we can hold a good amount of weights per neuron for preciseness and a good amount of inputs for extra brain power. Not only that we also have a max of about 126 if my memory serves right, plenty of neurons to add if you agree.

Edit: Boss let’s refrain from off topic posts, remember only thing I will allow are post contributing to the topic, anything else will be flagged. Only warning.

6 Likes

Yessss we are totally through this time

2 Likes