0

I'm trying really hard to make this self learning A.I. in python, I can not stress enough how complex this is for me, however I'm hopeing one of you can explain how to start one from the ground up, I don't need any super complex code, but you know something that to start off from because I have no clue whatsoever on how to build this I have tried though Here is what I have done for storing messages,I'm not sure if I should only do key words or what, but I'm massivly confused. If anyone can explain how to build a simple A.I. bot that self learns without imported modules you have no idea how much that would help but, here is my current code

class Learn:
    def __init__(self):
         self.messages = list() # I plan to use a txt file or something later on
    def toggle(self,mode):
         self.learning = bool(mode)
         while self.learning:
             msg = input(">")
             if msg == "turn off":
                 self.learning = False
                 self.getting = True
                 while self.getting:
                     msg = input(">")
                     print("got %s" % self.getMsgs(msg))
                 return
             self.store(msg)
             print(self.messages)
     def store(self,msg):
         self.messages.append(msg) #i'm storing the entire message here but like I said I have no idea on how to approach this
     def getMsgs(self,msg):
         return [x for x in self.messages if msg in x]
if __name__ == "__main__":
     Learn().toggle(True)

So to some or most of you it is probably quite clear I have no idea on how to start this off, any code examples,links,anything to help me at least start this off would be great! I just need to know on how to start this and I can probably figure out the rest or at least get a rough idea to go by, and for some of you that are wondering if I want this overnight I don't, I just need something to start off of but the actual project may take a few months

ruler
  • 613
  • 1
  • 10
  • 17
  • What is the error you get with your code? How does what it does diverge from your expectations of what it should do? – inspectorG4dget Oct 07 '13 at 04:16
  • It works however, for the end task I would want something like, "My name is bob", it stores that then I could say, "What is my name?" And i t would reply something along the lines of "Austin" or "Your name is austin" I have no idea how to do anything like that though, any suggestions? – ruler Oct 07 '13 at 04:20
  • So you want to design an AI that could hold a conversation? – inspectorG4dget Oct 07 '13 at 04:22
  • Yes that is what i'm basically looking out to do,any sample codes or links are helpful at this point, I'm confusing my self trying to figure this out. – ruler Oct 07 '13 at 04:27
  • ["how to build my own cleverbot" on SO](http://stackoverflow.com/q/1748887/198633), [chatbot tutorial](http://www.codeproject.com/Articles/36106/Chatbot-Tutorial), [chatbot creation for beginners](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CC0QFjAA&url=http%3A%2F%2Fwww.chatbots.org%2Fai_zone%2Fviewthread%2F492%2F&ei=RzhSUrrXN8TQyAGp3YGgAg&usg=AFQjCNEifBeNmi6cgrZmRCWvQNX-D2lM1Q&sig2=3crrL1uabuoOvlE6oENmFg&bvm=bv.53537100,d.aWc&cad=rja), [what you should google for](http://bit.ly/1aezje1) – inspectorG4dget Oct 07 '13 at 04:29

0 Answers0