Perceptron Learning Algorithm in C

Image result for rosenblatt's perceptron


You can vary the learning coefficients (0<lr<1), the desired output, initial weights etc. And then see the difference in the number of epoch’s it takes for the perceptron to learn a particular pattern.

For example : For AND Gate Yd=[0 0 0 1]  and for OR Gate Yd=[0 1 1 1]

Here we display the output for AND operation:



Thank you.


The Author is an MTech in Computer Science and Engineering from M.A. College of Engineering, Kothamangalam. He currently teaches Computer Science(UWE) at Villa College, Male`, Maldives.

For any queries, you can reach the author at –


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s