Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1 by neavvy

View this thread on steempeak.com
· @neavvy ·
$41.67
Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1
### Repository
https://github.com/jankulik/AI-Flappy-Bird

### What Will I Learn?

- You will learn the basics of neural networks
- You will learn what are the components of perceptron
- You will learn what is the decision-making process of perceptron
- You will learn how perceptron can learn itself

### Difficulty
- Basic

<center> ![1.jpg](https://cdn.steemitimages.com/DQmWr3tCMWKGwe3ckfge1PRafmAWgQZmRUE1kbgHRXVdbPW/1.jpg)
<sub> *[Source](https://www.pexels.com/photo/office-working-app-computer-97077/)* </sub></center>

### Overview

In [one of my recent articles](https://steemit.com/steemstem/@neavvy/ai-learns-to-play-flappy-bird-the-impact-of-machine-learning-on-steem-blockchain) I presented a simple AI model that learns itself to play Flappy Bird. Today, I would like to take a closer look on how this model works from the technical side and learn the basics of neural networks. In the first episode of this tutorial I will discuss the general concept of perceptron, its core components and the learning algorithm. In the second episode I will show how to implement those concepts into Java code and build a fully fledged neural network.

Here is a video showing the learning process of this AI:
https://www.youtube.com/watch?v=HQYsjk9Ufkw&feature=youtu.be

### Perceptron - the simplest neural network

Human brain can be defined as an incredibly sophisticated network containing [86 billion neurons](https://www.verywellmind.com/how-many-neurons-are-in-the-brain-2794889) communicating with each other using electrical signals. Brain as a whole is still an elaborate and complex mistery, but structure of a single neuron is already quite exhaustively researched. Simplistically, dendrites receive input signals and, accordingly to those inputs, fire an output signals through synapses. 

<center> ![neuron.png](https://cdn.steemitimages.com/DQmTm69YEHefvphBG2oLauydkm1H6aasfkNg1puRMwrP2Qh/neuron.png)
<sub> *[Source](https://pl.wikipedia.org/wiki/Neuron#/media/File:Neuron,_LangNeutral.svg)* </sub></center>

My Flappy Bird AI model is based on the simplest possible neural network - perceptron. In other words, a computational representation of a single neuron. Similarly to the real one, it receives input signals and contains a processing unit, which provides output accordingly.

![perceptron1.png](https://cdn.steemitimages.com/DQmW4h75DMCZE239D9qFyES4aFXLspTojnNxQkNo8WUyNsK/perceptron1.png)

### Components of perceptron
##### Inputs
Inputs are  numbers that allow perceptron to perceive the reality. In case of my model there are only 2 inputs:

- horizontal distance between bird and the pipe

- vertical distance between bird and the upper part of the pipe

![perceptron2.jpg](https://cdn.steemitimages.com/DQmbpa1RfkGuu4GkDhYSNzAGsJMcDrbLHeENfX1ZbEQ6iNt/perceptron2.jpg)

In order to create an adaptive and self-learning model, each input needs to be weighted. Weight is a number (usually between -1 and 1) that defines how the processing unit interprets particular input. When perceptron is created, weights are assigned to each input randomly, then they are modified during a learning process in order to achieve the best performance.

![perceptron3.png](https://cdn.steemitimages.com/DQmP3AqcKxYdbLYN2a67fDREDsHi4t4Aefqh6ZkdtSaGFP1/perceptron3.png)

##### Processing unit
Processing unit interprets inputs according to their weights. Firstly, it multiplies every input by its weight, then it sums the results. Let's assume we have such inputs and randomly generated weights:
```
Input 1: 27
Input 2: 15

Weight 1: -0.5
Weight 2: 0.75

Input 1 * Weight 1 ⇒ 27 * -0.5 = -13.5
Input 2 * Weight 2 ⇒ 15 * 0.75 = 11.25

Sum = -13.5 + 11.25 = -2.25
```

For such inputs and weights our processing unit will return the value of ```-2.25```.

##### Output
The final output of the perceptron in our case should be binary (true or false), as it needs to decide whether to make the bird jump or not. In order to convert our sum (in our example ```-2.25```) into such output, we need to pass it through activation function. In this case it may be really simple: if sum is positive it returns true, if sum is negative it returns false.
```
Sum = -2.25
Sum < 0 ⇒ Output = false
```
Under such circumstances our bird would not perform a jump.

##### Bias
Situation becomes more complicated when the value of both inputs is equal to ```0```:
```
Input 1: 0
Input 2: 0

Weight 1: -0.5
Weight 2: 0.75

Input 1 * Weight 1 ⇒ 0 * -0.5 = 0
Input 2 * Weight 2 ⇒ 0 * 0.75 = 0

Sum = 0 + 0 = 0
```
In that case, regardless of the value of weights, the processing unit will always return a sum equal to ```0```. Due to that, activation function will not be able to properly decide whether to perform a jump or not. A solution to this problem is bias, which is an additional input with a fixed value of ```1``` and its own weight.

![perceptron4.png](https://cdn.steemitimages.com/DQmXR6b9AR9VkVrezw5pZCr24U4NXQCAtKVwmtWWzrrjMd8/perceptron4.png)

Here are the results of sum with bias (remember that bias is always equal to ```1```, but its weight may be any number):
```
Input 1 * Weight 1 = 0
Input 2 * Weight 2 = 0
Bias * Bias Weight ⇒ 1 * Bias Weight = Bias Weight

Sum = 0 + 0 + Bias Weight = Bias Weight
```

In that case, bias's weight is the only factor having impact on the final output of the perceptron. If it is a positive number bird will perform a jump, otherwise it will continue falling. Bias defines the behavior and perceptron's understanding of reality for inputs equal to ```0```.

##### Learning process

If bird had collision with the pipe, it implies that its perceptron made some wrong decision. In order to avoid such situation in the future we need to adapt the perceptron by adjusting its weights. The output of our perceptron is binary, so there are only 2 possibilities:

- bird collided with the upper pipe - it probably jumps too often; output is too often true - **weights need to be decreased.**

- bird collided with the lower pipe - it probably jumps too seldom; output is too often false - **weights need to be increased.**

Weights can be easily adjusted using the following equation:
```
New Weight = Current Weight + Error * Input * Learning Constant
```

- **Error** can be described as a difference between expected and actual behavior. In our case error will equal to ```1``` or ```-1```, thus defining if weights will be increased or decreased. If we need to increase weights (bird jumps too seldom) error will be equal to ```1```, if we want to decrease weights (bird jumps too often) error will be equal to ```-1```.

- **Input** assigned to weight that we are modifying. We need to consider input in the moment of bird collision.

- **Learning Constant** is a variable that defines how rapid will be the change in the value of weights, thus controlling the pace of learning. The bigger learning constant is, the faster Perceptron learns, but with the smaller precision. In the Flappy Bird model I have used ```0.001``` as a learning constant.

### My other articles related to Artificial Intelligence:
- [AI learns to play Flappy Bird - the impact of machine learning on Steem Blockchain](https://steemit.com/steemstem/@neavvy/ai-learns-to-play-flappy-bird-the-impact-of-machine-learning-on-steem-blockchain)
- [Our fear of Artificial Intelligence - is it reasoned?](https://steemit.com/steemstem/@neavvy/our-fear-of-artificial-intelligence-is-it-reasoned)
- [I made a self-learning AI to play Tic Tac Toe!](https://steemit.com/ai/@neavvy/i-made-a-self-learning-ai-to-play-tic-tac-toe)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 72 others
properties (23)
post_id73,084,616
authorneavvy
permlinkteaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1
categoryutopian-io
json_metadata{"tags":["utopian-io","tutorials","ai","technology","science"],"image":["https:\/\/cdn.steemitimages.com\/DQmWr3tCMWKGwe3ckfge1PRafmAWgQZmRUE1kbgHRXVdbPW\/1.jpg","https:\/\/img.youtube.com\/vi\/HQYsjk9Ufkw\/0.jpg","https:\/\/cdn.steemitimages.com\/DQmTm69YEHefvphBG2oLauydkm1H6aasfkNg1puRMwrP2Qh\/neuron.png","https:\/\/cdn.steemitimages.com\/DQmW4h75DMCZE239D9qFyES4aFXLspTojnNxQkNo8WUyNsK\/perceptron1.png","https:\/\/cdn.steemitimages.com\/DQmbpa1RfkGuu4GkDhYSNzAGsJMcDrbLHeENfX1ZbEQ6iNt\/perceptron2.jpg","https:\/\/cdn.steemitimages.com\/DQmP3AqcKxYdbLYN2a67fDREDsHi4t4Aefqh6ZkdtSaGFP1\/perceptron3.png","https:\/\/cdn.steemitimages.com\/DQmXR6b9AR9VkVrezw5pZCr24U4NXQCAtKVwmtWWzrrjMd8\/perceptron4.png"],"links":["https:\/\/github.com\/jankulik\/AI-Flappy-Bird","https:\/\/www.pexels.com\/photo\/office-working-app-computer-97077\/","https:\/\/steemit.com\/steemstem\/@neavvy\/ai-learns-to-play-flappy-bird-the-impact-of-machine-learning-on-steem-blockchain","https:\/\/www.youtube.com\/watch?v=HQYsjk9Ufkw&feature=youtu.be","https:\/\/www.verywellmind.com\/how-many-neurons-are-in-the-brain-2794889","https:\/\/pl.wikipedia.org\/wiki\/Neuron#\/media\/File:Neuron,_LangNeutral.svg","https:\/\/steemit.com\/steemstem\/@neavvy\/our-fear-of-artificial-intelligence-is-it-reasoned","https:\/\/steemit.com\/ai\/@neavvy\/i-made-a-self-learning-ai-to-play-tic-tac-toe"],"app":"steemit\/0.1","format":"markdown"}
created2019-04-14 10:42:06
last_update2019-04-14 10:42:06
depth0
children22
net_rshares66,822,746,628,159
last_payout2019-04-21 10:42:06
cashout_time1969-12-31 23:59:59
total_payout_value31.701 SBD
curator_payout_value9.967 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length7,534
author_reputation7,152,278,952,737
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (136)
@juanmolina ·
$0.04
I enjoyed reading this article. I remembered my first forays with logic and basic programming.

The addition of variables might make the model more effective. But this procedure is so simple and so efficient.

I remember once when we learned the "Bubble Sort" method. Only one student was able to complete the procedure and he achieved it with many lines of code.
A couple of years later we met at my house and managed to perform random data sorting using the bubble method. Only this time the program consisted of no more than ten lines of code.

This is the difference between effective and efficient programming.

Dear @neavvy, I congratulate you for having an extremely efficient programming.
👍  ,
properties (23)
post_id73,120,095
authorjuanmolina
permlinkre-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190415t021324686z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["neavvy"],"app":"steemit\/0.1"}
created2019-04-15 01:43:24
last_update2019-04-15 01:43:24
depth1
children2
net_rshares68,393,403,752
last_payout2019-04-22 01:43:24
cashout_time1969-12-31 23:59:59
total_payout_value0.031 SBD
curator_payout_value0.010 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length696
author_reputation69,360,323,670,434
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)
@neavvy ·
Thank you for your comment dear @juanmolina!

> I remember once when we learned the "Bubble Sort" method. Only one student was able to complete the procedure and he achieved it with many lines of code.

Sorting algorithms are indeed a bit tricky. Have you seen this visualization of Bubble sort in dance? I really love it.

https://www.youtube.com/watch?v=lyZQPjUT5B4
👍  
properties (23)
post_id73,304,478
authorneavvy
permlinkre-juanmolina-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190418t085115911z
categoryutopian-io
json_metadata{"community":"busy","app":"busy\/2.5.6","format":"markdown","tags":["utopian-io"],"users":["juanmolina"],"links":["\/@juanmolina"]}
created2019-04-18 08:51:18
last_update2019-04-18 08:51:18
depth2
children1
net_rshares20,639,888,496
last_payout2019-04-25 08:51:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length367
author_reputation7,152,278,952,737
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@juanmolina ·
Wow...LOL!
Thank you @neavvy, my friend.
properties (22)
post_id73,316,745
authorjuanmolina
permlinkre-neavvy-re-juanmolina-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190418t134215670z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["neavvy"],"app":"steemit\/0.1"}
created2019-04-18 13:12:15
last_update2019-04-18 13:12:15
depth3
children0
net_rshares0
last_payout2019-04-25 13:12:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length40
author_reputation69,360,323,670,434
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@lanzjoseg ·
$0.04
Dear @neavvy 


I must quote this content:

> Human brain can be defined as an incredibly sophisticated network containing 86 billion neurons communicating with each other using electrical signals. Brain as a whole is still an elaborate and complex mistery, but structure of a single neuron is already quite exhaustively researched. Simplistically, dendrites receive input signals and, accordingly to those inputs, fire an output signals through synapses.


But despite this very fine description, I still think that its complexity remains infinite. the AI could emulate in everything but never overcome, always the human Brain will look for the way to solve any problem no matter how complex it may be. If at some time the AI will succeed, it will be for a short time.

But after all your explanation in a very didactic way it may seem very simple, which is not, Friend I congratulate you for this ..

Regards

A virtual hug for you.
https://steemitimages.com/100x100/https://media.giphy.com/media/3o752eeJF1EMxL8RHO/giphy.gif
👍  ,
properties (23)
post_id73,121,769
authorlanzjoseg
permlinkre-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190415t030155701z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["neavvy"],"image":["https:\/\/steemitimages.com\/100x100\/https:\/\/media.giphy.com\/media\/3o752eeJF1EMxL8RHO\/giphy.gif"],"app":"steemit\/0.1"}
created2019-04-15 02:32:42
last_update2019-04-15 02:32:42
depth1
children3
net_rshares68,575,227,046
last_payout2019-04-22 02:32:42
cashout_time1969-12-31 23:59:59
total_payout_value0.032 SBD
curator_payout_value0.010 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,027
author_reputation305,101,571,399,333
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)
@jadams2k18 ·
$0.04
You're right in what you propose friend @lanzjoseg.

As artificial intelligence programs improve, they become smarter. The human brain is also evolving in response to changes in the world. It is certain that as we see its size with respect to time, has increased.

I am sure that just as species evolve to survive, as Darwin indicated, the human brain should not be the exception.

Cheers!
👍  ,
properties (23)
post_id73,141,754
authorjadams2k18
permlinkre-lanzjoseg-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190415t112012196z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["lanzjoseg"],"app":"steemit\/0.1"}
created2019-04-15 11:20:06
last_update2019-04-15 11:20:06
depth2
children1
net_rshares68,639,298,351
last_payout2019-04-22 11:20:06
cashout_time1969-12-31 23:59:59
total_payout_value0.032 SBD
curator_payout_value0.010 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length389
author_reputation26,505,337,179,010
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)
@neavvy ·
> I am sure that just as species evolve to survive, as Darwin indicated, the human brain should not be the exception.

You are right @jadams2k18. Human brain evolves extremely fast.
👍  
properties (23)
post_id73,302,169
authorneavvy
permlinkre-jadams2k18-re-lanzjoseg-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190418t075325054z
categoryutopian-io
json_metadata{"community":"busy","app":"busy\/2.5.6","format":"markdown","tags":["utopian-io"],"users":["jadams2k18."],"links":["\/@jadams2k18"]}
created2019-04-18 07:53:27
last_update2019-04-18 07:53:27
depth3
children0
net_rshares11,792,671,453
last_payout2019-04-25 07:53:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length181
author_reputation7,152,278,952,737
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@neavvy ·
Thank you for your comment my dear friend @lanzjoseg!

> If at some time the AI will succeed, it will be for a short time.

Yes, I get your point. Human brain is definitely complex mistery and I think humanity is not going to figure it out within next years. 

> But after all your explanation in a very didactic way it may seem very simple, which is not, Friend I congratulate you for this ..

Thank you :)
properties (22)
post_id73,302,046
authorneavvy
permlinkre-lanzjoseg-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190418t074939041z
categoryutopian-io
json_metadata{"community":"busy","app":"busy\/2.5.6","format":"markdown","tags":["utopian-io"],"users":["lanzjoseg"],"links":["\/@lanzjoseg"]}
created2019-04-18 07:49:39
last_update2019-04-18 07:49:39
depth2
children0
net_rshares0
last_payout2019-04-25 07:49:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length407
author_reputation7,152,278,952,737
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@ocdb ·
re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190415t034939785z
You got a 30.70% upvote from @ocdb courtesy of @neavvy! :)

@ocdb is a non-profit bidbot for whitelisted Steemians, current max bid is 45 SBD and the equivalent amount in STEEM.
Check our website https://thegoodwhales.io/ for the whitelist, queue and delegation info. Join our [Discord channel for more information.](https://discord.gg/k2Hu77b)


If you like what @ocd does, consider voting for [ocd-witness through SteemConnect](steemconnect.com/sign/account-witness-vote?witness=ocd-witness&approve=1) or on the [Steemit Witnesses page.](https://steemit.com/~witnesses) :)
properties (22)
post_id73,124,575
authorocdb
permlinkre-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190415t034939785z
categoryutopian-io
json_metadata{"app":"postpromoter\/1.9.3"}
created2019-04-15 03:49:39
last_update2019-04-15 03:49:39
depth1
children0
net_rshares0
last_payout2019-04-22 03:49:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length574
author_reputation3,405,824,162,324
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@jadams2k18 ·
$0.04
Hi, again, @neavvy!

I have always liked to know about neural network programming, although I have never developed a program as such. I'm still not used to AI philosophy, especially artificial neurons or perceptrons.

Many years ago, I had made, in language C, a program of riddles that it was "learning". This program asked you about the characteristics of an animal and if it could not guess it, it added it in its database for next guesses. It was actually a tree made with pointers. At that time it was my first attempt to create artificial intelligence. https://i.imgur.com/3XgJvl0.png

By the way, what language did you use to program?

BTW, Look at this

https://hackernoon.com/how-to-make-a-simple-machine-learning-website-from-scratch-1ae4756c8b04

Keep in touch
👍  ,
properties (23)
post_id73,140,990
authorjadams2k18
permlinkre-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190415t110306568z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["neavvy"],"image":["https:\/\/i.imgur.com\/3XgJvl0.png"],"links":["https:\/\/hackernoon.com\/how-to-make-a-simple-machine-learning-website-from-scratch-1ae4756c8b04"],"app":"steemit\/0.1"}
created2019-04-15 11:03:00
last_update2019-04-15 11:03:00
depth1
children2
net_rshares68,821,124,916
last_payout2019-04-22 11:03:00
cashout_time1969-12-31 23:59:59
total_payout_value0.032 SBD
curator_payout_value0.010 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length771
author_reputation26,505,337,179,010
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)
@neavvy ·
Thank you for reply dear @jadams2k18 :)

> Many years ago, I had made, in language C, a program of riddles that it was "learning". This program asked you about the characteristics of an animal and if it could not guess it, it added it in its database for next guesses. It was actually a tree made with pointers. At that time it was my first attempt to create artificial intelligence.

Wow, that sounds really interesting. Was this guessing and learning algorithm efficient?

> By the way, what language did you use to program?

I used Java in a Processing IDE.

This article is really interesting, thank you for sharing :) 
👍  
properties (23)
post_id73,304,257
authorneavvy
permlinkre-jadams2k18-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190418t084509238z
categoryutopian-io
json_metadata{"community":"busy","app":"busy\/2.5.6","format":"markdown","tags":["utopian-io"],"users":["jadams2k18"],"links":["\/@jadams2k18"]}
created2019-04-18 08:45:09
last_update2019-04-18 08:45:09
depth2
children1
net_rshares11,557,175,301
last_payout2019-04-25 08:45:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length623
author_reputation7,152,278,952,737
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@jadams2k18 ·
Nah! When you closed the app, at that time, we call them executables; it forgot everything because the program didn't save all the knowledge it learned.

These programs ran on those computers that used floppy disks 5-1/4. They had a monitor or screen, the fat ones that were monochromatic and only have an amber color that burned your retinas, besides that surely it made you a free x-ray test, every time you turned it on.

https://i.imgur.com/Q202JJT.png
properties (22)
post_id73,308,112
authorjadams2k18
permlinkre-neavvy-re-jadams2k18-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190418t103057497z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"image":["https:\/\/i.imgur.com\/Q202JJT.png"],"app":"steemit\/0.1"}
created2019-04-18 10:30:54
last_update2019-04-18 10:30:54
depth3
children0
net_rshares0
last_payout2019-04-25 10:30:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length456
author_reputation26,505,337,179,010
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@chasmic-cosm ·
**Awesome post!**

Machine learning is such an interesting topic!
properties (22)
post_id73,172,850
authorchasmic-cosm
permlinkre-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190415t234435928z
categoryutopian-io
json_metadata{"community":"busy","app":"busy\/2.5.6","format":"markdown","tags":["utopian-io"],"users":[],"links":[]}
created2019-04-15 23:44:36
last_update2019-04-15 23:44:36
depth1
children1
net_rshares0
last_payout2019-04-22 23:44:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length65
author_reputation2,524,772,331,601
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@neavvy ·
Thank you @chasmic-cosm :) I saw you are interested in fractals - this is also a fascinating area!
properties (22)
post_id73,205,330
authorneavvy
permlinkre-chasmic-cosm-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190416t141555874z
categoryutopian-io
json_metadata{"community":"busy","app":"busy\/2.5.6","format":"markdown","tags":["utopian-io"],"users":["chasmic-cosm"],"links":["\/@chasmic-cosm"]}
created2019-04-16 14:15:57
last_update2019-04-16 14:15:57
depth2
children0
net_rshares0
last_payout2019-04-23 14:15:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length98
author_reputation7,152,278,952,737
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@yokunjon ·
$6.87
I thank you for your contribution. Here are my thoughts. Note that, my thoughts are my personal ideas on your post and they are not directly related to the review and scoring unlike the answers I gave in the questionnaire;

* **Content**

  * Although basic, I look forward to updates if you would like to expand this concept to another level. You may choose a language and express the concepts by programming them with examples, which is more preferred than plain theory I suppose.

----
Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/8/2-1-3-2-1-4-2-4-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
👍  , , , , , , , , , , , , ,
properties (23)
post_id73,212,311
authoryokunjon
permlinkre-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190416t163028058z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https:\/\/join.utopian.io\/guidelines","https:\/\/review.utopian.io\/result\/8\/2-1-3-2-1-4-2-4-","https:\/\/discord.gg\/uTyJkNm","https:\/\/join.utopian.io\/"],"app":"steemit\/0.1"}
created2019-04-16 16:30:24
last_update2019-04-16 16:30:24
depth1
children2
net_rshares11,523,440,279,945
last_payout2019-04-23 16:30:24
cashout_time1969-12-31 23:59:59
total_payout_value5.242 SBD
curator_payout_value1.626 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length939
author_reputation14,981,508,863,374
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (14)
@neavvy ·
Thank you for your review.
👍  
properties (23)
post_id73,243,809
authorneavvy
permlinkre-yokunjon-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190417t064806261z
categoryutopian-io
json_metadata{"community":"busy","app":"busy\/2.5.6","format":"markdown","tags":["utopian-io"],"users":[],"links":[]}
created2019-04-17 06:48:09
last_update2019-04-17 06:48:09
depth2
children0
net_rshares19,119,239,063
last_payout2019-04-24 06:48:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length26
author_reputation7,152,278,952,737
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@utopian-io ·
Thank you for your review, @yokunjon! Keep up the good work!
👍  
properties (23)
post_id73,347,040
authorutopian-io
permlinkre-re-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190416t163028058z-20190418t234617z
categoryutopian-io
json_metadata{"app":"beem\/0.20.17"}
created2019-04-18 23:46:18
last_update2019-04-18 23:46:18
depth2
children0
net_rshares19,510,170,810
last_payout2019-04-25 23:46:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length60
author_reputation152,913,012,544,965
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@steem-ua ·
#### Hi @neavvy!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
post_id73,212,811
authorsteem-ua
permlinkre-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190416t164041z
categoryutopian-io
json_metadata{"app":"beem\/0.20.19"}
created2019-04-16 16:40:42
last_update2019-04-16 16:40:42
depth1
children0
net_rshares0
last_payout2019-04-23 16:40:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length285
author_reputation23,203,609,903,979
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@utopian-io ·
Hey, @neavvy!

**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
post_id73,215,346
authorutopian-io
permlinkre-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190416t174223z
categoryutopian-io
json_metadata{"app":"beem\/0.20.17"}
created2019-04-16 17:42:24
last_update2019-04-16 17:42:24
depth1
children0
net_rshares0
last_payout2019-04-23 17:42:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length588
author_reputation152,913,012,544,965
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steemitboard ·
Congratulations @neavvy! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@neavvy/payout.png?201904211244</td><td>You received more than 250 as payout for your posts. Your next target is to reach a total payout of 500</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@neavvy) and compare to others on the [Steem Ranking](http://steemitboard.com/ranking/index.php?name=neavvy)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
post_id73,483,175
authorsteemitboard
permlinksteemitboard-notify-neavvy-20190421t134241000z
categoryutopian-io
json_metadata{"image":["https:\/\/steemitboard.com\/img\/notify.png"]}
created2019-04-21 13:42:39
last_update2019-04-21 13:42:39
depth1
children0
net_rshares0
last_payout2019-04-28 13:42:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length849
author_reputation38,705,954,145,809
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@a-non-e-moose ·
The knowing whether it hit the upper or lower pipe combined with the generalization that if it hits the top it needs to flap less and if it hits the bottom it needs to flap more were the parts I was missing.

The simple environment and neural network help a whole lot here. By knowing just how tweaking the weights will effect the output behavior and that it's a matter of only signal frequency you can make progress toward error reduction.

As you start using more complex networks, perhaps with many inputs/outputs and multiple wide layers, or in more complicated environments, perhaps even ones where some or all outputs have magnitude and are not just binary, knowing how to tweak what and when quickly becomes astronomically difficult.

Have you done anything with larger networks in richer environments?
properties (22)
post_id73,518,373
authora-non-e-moose
permlinkre-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190422t034957527z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit\/0.1"}
created2019-04-22 03:50:00
last_update2019-04-22 03:50:00
depth1
children0
net_rshares0
last_payout2019-04-29 03:50:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length809
author_reputation518,136,806,985
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@danielfs ·
Hi @neavvy

This is a great post. I would like to find the time to get my hands dirty to build and understand the code.   I'm waiting for the next post.

Sorry for the late reply, regards,
properties (22)
post_id73,674,092
authordanielfs
permlinkre-neavvy-teaching-ai-to-play-flappy-bird-the-concept-of-perceptron-or-neural-networks-1-20190425t001132155z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["neavvy"],"app":"steemit\/0.1"}
created2019-04-25 00:11:33
last_update2019-04-25 00:11:33
depth1
children0
net_rshares0
last_payout2019-05-02 00:11:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length188
author_reputation4,179,372,792,084
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@danielfs ·
$0.04
Hi @neavvy, I'm very curious about your code.

I downloaded <a href="https://processing.org/">Processing</a> and installed it in my mackbook, then I ran the code.  the window was too big (in my macbook screen)

To get some background in processing, I studied some lessons in <a href="https://funprogramming.org/">funprogramming.org</a>. After that I modified the code by changing the height of the window (690 instead of 1920):


`void setup()
    {
     size(1080,690);
   ... } `
 
The window now fits pretty good in my screen, However the birds and pipes are big in comparison with the new window size.  I guess I have to resize them too.

Any clue to resize them?  :)

BR, Daniel
👍  ,
properties (23)
post_id79,068,771
authordanielfs
permlinkpw98s5
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["neavvy"],"links":["https:\/\/processing.org\/","https:\/\/funprogramming.org\/"],"app":"steemit\/0.1"}
created2019-08-15 01:43:18
last_update2019-08-15 01:43:18
depth1
children0
net_rshares110,664,234,859
last_payout2019-08-22 01:43:18
cashout_time1969-12-31 23:59:59
total_payout_value0.028 SBD
curator_payout_value0.008 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length683
author_reputation4,179,372,792,084
root_title"Teaching AI to play Flappy Bird - the concept of perceptron | Neural Networks #1"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)