C/C++ Is It Challenging to Write a Perceptron Learning Algorithm in C++?

  • Thread starter Thread starter Math Is Hard
  • Start date Start date
  • Tags Tags
    Algorithm
AI Thread Summary
The discussion centers around the implementation of a perceptron learning algorithm, with participants sharing their experiences in different programming languages. One user successfully wrote a simple perceptron in C++, noting that it was not overly complicated, while acknowledging that more complex algorithms like backpropagation for neural networks present greater challenges. Another participant is attempting to diagram a two-input perceptron to learn the OR logic function but is facing difficulties and plans to seek help if they cannot resolve the issues soon. The conversation highlights the advantages of using specialized matrix programming environments, like MATLAB, over C++ for certain tasks. Additionally, there is enthusiasm for artificial intelligence projects, with mentions of interesting AI applications, such as a program that assembles jigsaw puzzles. A user also shares a link to their Java implementation of a perceptron as a simple proof of concept, providing resources for others interested in the topic.
Math Is Hard
Staff Emeritus
Science Advisor
Gold Member
Messages
4,650
Reaction score
39
Have you ever written a perceptron learning algorithm?

http://en.wikipedia.org/wiki/Perceptron

Which language did you use? Would it be overly complicated to try to write it in C++ (compared with, say, MATLAB)?
 
Technology news on Phys.org
Hello,

yes, I have. I wrote it in C++ and it was not so hard. Simple perceptron is not very hard problem. Harder ist to write backprogation algorithm for a forward or recurent neural network.
 
Thanks for your reply. I am still trying to work it out on paper, and now I can see how a program that is specialized for matrices could have an advantage over implementing it in C++.

I have been trying to diagram out a simple two-input perceptron that will take a training set to learn the logic for OR, but I have been getting stuck. If I can't figure it out in a couple of days, I'll put up a diagram and some pseudocode and maybe you could help me figure out where I am going wrong. I agree - this should be simple! :redface:
 
Coding up artificial intelligence is really neat when it works. :smile:
 
Hurkyl said:
Coding up artificial intelligence is really neat when it works. :smile:

I've looked at the course websites for various AI classes and some of the projects they do look really fun. One team had created a program that took scanned pieces of a jigsaw puzzle and put them together. I thought that was very cool!
 
Hi:

I have the perceptron code in JAVA. Is a very simple proof of concepto. I give you a link to my site. The page is in spanish but you can download it from the very bottom of the page.

http://www.tecnohobby.net/ppal/index.php?option=com_content&view=article&id=22:perceptron&catid=42:rna&Itemid=19

Hope it is helpfull.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top