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