Share your repls and programming experiences

Back to all posts
Ultimate A.I.
PCL (240)

This is Ultimate A.I. He learns how to answer questions and chat the more you speak to him.This was made using a basic "neural network" my class invented. This was made mostly by alexis garcia, who wanted to learn coding in my mechatronics class.

Commentshotnewtop
PixelBitez (168)

i think their be something fishy going on in the voters section

PixelBitez (168)

@PCL i kinda guessed cuz of the same school, charisma 100

rhage8252 (2)

You will win the Epic Victory Royale!

ChristianThone (35)

Cool! I think you should have preset questions and answers.

PCL (240)

@ChristianThone ok, I will update it soon.

ChristianThone (35)

@PCL Ok!
I have a method I am using currently which employs the use of lists in order for your AI to talk to people. This method is simple and cleans up your code so you have less if()then[] Statements.

Here it is

# This is a file other than main.py. Any file you wish to name it tho.

UserI_Checks = ['hello', 'what is your name?', 'who made you?']
AI_Responses = ['Hi!', 'My name is Ultimate AI.', 'I was made by @PCL.']

# And now in the main.py file
from [Your File] import UserI_Checks, AI_Responses
UserI = str.lower(input(": "))

if UserI in UserI_Checks:
  print(AI_Respones[UserI_Checks.index(UserI)])
else: 
   print("Hmmm? I don't understand that, what does that mean?")
   [Your Neural Network Here]

Now for a quick explaination, There are two lists one for each object UserI_Checks which contains a list of UIser Inputs you wish for the AI to watch for, and AI_Responses which are the responses the AI will use when the User Input calls it. Now make sure that you are putting the User input and the desired response in the same index as eachother!

I hope you use this!

PCL (240)

@ChristianThone I will integrate that code soon :)

epicman702 (39)

good job otherwise!
Your class is amazing!

TheRichHacker (1)

Nice try kid...
But you failed, this is not artificial intelligence.
Learn more Python, better luck next time!

PCL (240)

@TheRichHacker Kid? I am 23 and a tech teacher.This is what my class put together

timmy_i_chen (960)

@PCL Sorry about TheRichHacker - he's been banned for his comments here.

ChristianThone (35)

@PCL Yea good that he has been banned, and this is artificial intelligence because it learns based off of user input, thats pretty intelligent If I say so myself. Mega Applause all for you. Keep learning, everyday you will get better, ignore the hate, and learn from supporters like me! KEEP CODING!!!!

DrCereal (0)

@timmy_i_chen Wait, why was he banned?

timmy_i_chen (960)

@DrCereal For being unhelpful. There's a fine line between correcting a mistake, and being condescending and rude.

HeroCast2 (0)

@timmy_i_chen Really? For being "unhelpful"? You called this a "neural network", when it's clearly not even close. Have you ever seen one before? It looks something like this:

class NeuralNetwork:
def init(self, x, y):
self.input = x
self.weights1 = np.random.rand(self.input.shape[1],4)
self.weights2 = np.random.rand(4,1)
self.y = y
self.output = np.zeros(self.y.shape)

def feedforward(self):
    self.layer1 = sigmoid(np.dot(self.input, self.weights1))
    self.output = sigmoid(np.dot(self.layer1, self.weights2))

He is not the only one who says that. Your program simply saves literally whatever you type in it, so I also disagree about this "neural network" your class made thinking it was.

timmy_i_chen (960)

@HeroCast2 I'm not saying he's wrong, but you can make a point without being condescending or being a jerk. e.g. see a comment below "This isn't a neural network" - that's fine to say. It's about how it's said.

HeroCast2 (0)

@timmy_i_chen Ohhhh ok, I fully understand now

PCL (240)

@HeroCast2 I made this project for my class, because it was in my lesson books for chat bot input and output. The class chose to make it that way.

JOSHUAKOU (0)

It is just a list of questions that corresponds to answers.

katyadee (1127)

You should add a gaming element to this...for the game jam ;)

DrCereal (0)

Not to rain on anybody's parade, but this isn't really A.I, or a neural network...
I sure hope I'm not considered being "mean" for stating a fact. It's a cool project, and I'm glad you and your class could make it.

mkhoi (197)

There are so many mean comments here

timmy_i_chen (960)

@mkhoi The owners of the mean comments have been banned. Thanks for reporting.

HeroCast2 (0)

@mkhoi The reason is that this clearly isn't a neural network, all it does is save whatever you type.

FunnelLover (0)

@HeroCast2 Yep, i'm not sure why he told his class it was

NEILSENBENJAMIN (25)

This isn't a neural network.

ChristianThone (35)

@NEILSENBENJAMIN
I agree with you here as it isn't a Neural Network it's a good representation of Pure Artificial Intelligence. We both can agree on that.

FunnelLover (0)

@NEILSENBENJAMIN Someone on here got banned for saying the same thing LOL

epicman702 (39)

you should do while true
It makes it more professional
instead of while 1==1

ChristianThone (35)

@epicman702
Funny, I believe they do the exact same thing.
Considering while True makes zero sense. Tell me these do not have the same function:

while True:
  #do something
while 1 == 1:
  #do something
epicman702 (39)

@ChristianThone they do
It just makes it look more professional

bobmcbob (6)

@epicman702 It really doesn't, they do the same thing, take up equal lines, and for a new programmer, while 1==1 may even make more sense!

epicman702 (39)

@bobmcbob Thats true actually!
I wonder why my tutor didn't teach me that
Lol!

Axolotl1 (3)

It kept crashing.

PCL (240)

@Axolotl1 oof I will fix that.