Real Python AI

by slade101 in Circuits > Software

4648 Views, 35 Favorites, 0 Comments

Real Python AI

Screen Shot 2015-07-28 at 6.34.45 PM.png

this is is an instructable that will teach you how to make a python AI.(for real!!!!!!!!!!!)

Programing Your AI

Screen Shot 2015-07-28 at 6.34.45 PM.png

here is how to make him. first you have to import random then add different speech categories. like greetings or questions. later you can add categories to your software but for now you will have three. then put while True:

userinput = raw_input is very important so it takes what you put in and only what you put in. The rest is simple, all that you have to do is put: if userInput in greetings:

random_greetings = random.choice(greetings)

print(random_greeting)

to do the other stuff like the questions, all that you have to do is put elif instead of if.

if you are confused the picture at the top might help you.