At once I am not particularly angry about this issue, maybe it is not for this site). So I recently became interested in artificial intelligence, but Mey concerned about how to do it, I wrote a small program that imitate it:
import java.util.Scanner;
public class ai1 {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println("Ask fo me: ");
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
if(line.equalsIgnoreCase("hello")){
System.out.println("hello friend)");
}
}
}
But as you know, that such a program would be a lot of construction:
if{
}
The more it will take a very long time and just can not write. What do you think, how you can still make a prototype artificial intelligence, that he gave something original?
Maybe you have any ideas?
Just say, I’m not trying to make the analogy of the brain, I just want to write the Intellectual interlocutor who can learn and talk with me for a long time. Thank you in advance for your answers.
UPD
Java may not be very suitable for this, but it’s the only thing that I know of)
UPD 2
Maybe there are examples of such programs interlocutors, or sites where a lot of material as they build
(It is desirable that they were on Java)
UPD 3
The main question that I’m interested in how to make it learner
2
Answers
Couple of years ago I was in similar situation, I was astonished with neural nets and wanted to implement them myself. But after all this time I can only advice – don’t bang your head against the door that is already opened. Reuse somebody else work – in particular I can advice using FANN which, as far as I’m aware, might have some wrappers to JAVA (it’s C++ library).
edit
As mentioned above you do not need to implement neural networks by yourself in order to understand it; I encourage you to check this video out: machine learning
This is just a single lecture of quite nice course provided by free on-line learning initiative of MIT, Harvard and number of other universities – check out here
Indeed there is much more to truly understand neural networks than just implementing it. You might successfully implement it, maybe even some nice learning algorithm and still you would not understand what you are doing. I’m telling this basing on my experience – I thought once that I will understand things just by building it and I can tell you this is a waste of time. Do study first to truly understand the subject, become an expert of it and while studying use open source materials provided by number of communities – like FANN and then, once you understand the field you may want to implement something to solve your specific problem and what more important you may improve solution developed by community of your choice so others can make use of your time and intelligence!
So I wish you happy studying 🙂
I respectfully disagree with Greg0ry’s answer. If you really want to learn about neural nets, implement one yourself. It’s not that hard, but it will take you a few days. You should be prepared to read a lot. It took me a few days of writing some sample code and reading before I was able to design my network. But let me tell you, it’s worth it! There are also a lot of resources out there. A good starting example is to implement an XOR gate using neural networks, which should give you a good starting-point.
If you’re interested, you can check out my example code here. It’s quite simple since it was a hobby project and it’s not as complicated as the other projects out there. I also have a video that explains the backpropagation algorithm.