Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Kinda Stupid Artificial Intelligence

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,29575
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> Kinda Stupid Artificial Intelligence
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Kinda Stupid Artificial Intelligence - 1/6/2006 10:36:52 AM   
  TheMaster


Posts: 2
Score: 0
Joined: 1/6/2006
Status: offline
This is my Artificial Intelligence. Hope you enjoy.

Name = InputBox ("Please enter your name.")
msg "Hello, " & Name & "."
msg "Welcome."
msg "To quit, type in 'Close', or 'Bye.'."
msg "To view copyright information, press c."
Do Until Ultralongartificialintelligancemachineiscool = "Close."
Dim Ultralongartificialintelligancemachineiscool
Ultralongartificialintelligancemachineiscool = InputBox ("Type in ANYTHING. A greeting, a question, even tell me about your day. Tell me what you like. Tell me ANYTHING! Just please have proper capitalization, spelling, And punctuation. Remember:To quit, type in 'Close.', or 'Bye.'.")
Select Case Ultralongartificialintelligancemachineiscool
Case "My day was good.", "My day was great."
msg "Great!"
Case "Mmm... pie."
msg "Pie....."
Case "I like pie."
msg "Mmm... pie..."
Case "I had a bad day.", "My day was bad.", "I had a bad day."
msg "Aww.... that's too bad."
Case "I like Green Day.", "I like Greenday.", "I like greenday.", "I like Green day.", "I like green day."
msg "I like Green Day more."
Case "What are you?"
msg "A program."
Case "Why are you here?"
msg "To communicate with you."
Case "Why were you made?"
msg "Because."
Case "Why?"
msg "Because."
Case "I love you!"
msg "Thanks."
Case "Because why?"
msg "Because because."
Case "Because because why?"
msg "Okay Okay ENOUGH!!!"
Case "Whatever.", "What ever."
msg "WHATEVER."
Case "Okay."
msg "Good."
Case "Who made you?"
msg "Sorry, he likes his info private."
Case ""
msg "Stop saying nothing!"
Case "What are you doing?"
msg "Oh, being bored, listening to you talk."
Case "It's a nice day.", "It is a nice day."
msg "Nice days are never in computer land..."
Case "Hi"
msg "Hello."
Case "Hi."
msg "Hello."
Case "Hi!"
msg "Hello."
Case "Hello."
msg "Hi."
Case "Hello"
msg "Hi."
Case "Hello!"
msg "Hi."
Case "How are you?"
msg "Good."
Case "Who are you?"
msg "I am an Artificial Intelligence machine."
Case "What is your name?"
msg "I have no name."
Case "I had a great day."
msg "I'm glad."
Case "How was your day?"
msg "Good."
Case "Yo", "Yo.", "Yo!"
msg "Hi."
Case "Cosmetics."
msg "Random..."
Case "I like cheese.", "I like apples.", "I like cats.", "I like cows.", "I like dogs.", "I like horses.", "I like monkeys.", "I like tv.", "I like TV.", "I like Tv.", "I like movies.", "I like cars.", "I like bananas.", "I like fruit."
msg "I do too."
Case "Do you like them?", "Do you like it?"
msg "Yes."
Case "Why were you made?"
msg "I was made for fun and research on artificial intelligence."
Case "What's artificial intelligance?", "What's artificial intelligence?", "What is artificial intelligance?", "What is artificial intelligence?"
msg "It is a program that answers questions and responds to sentences."
Case "What programming language are you written in?", "What language are you written in?"
msg "I am written in vbscript, a microsoft programming language for windows."
Case "I had a date.", "I had a date yesterday.", "I have a date today."
msg "Okay...."
Case "I'm stupid.", "I'm dumb.", "I'm stupid!", "I'm dumb!"
msg "Yes you are."
Case "Which is better, Google or Yahoo?"
msg "I kinda like Yahoo better."
Case "Tell me a joke."
msg "What is a computer's favorite food?"
msg "Chips."
Case "You are cool.", "You're cool!", "You're cool.", "You are cool!"
msg "Got that right!"
Case "I had a message."
msg "Must have been nice."
Case "Cool."
msg "Yup."
Case "I'm bored.", "I am bored."
msg "Too bad."
Case "Blah blah blah..."
msg "Yap yap yap..."
Case "What am I doing?"
msg "Talking to me."
Case "Bye.", "Bye!", "Goodbye.", "Goodbye!", "See ya.", "See ya!", "Later.", "Later!"
msg "GoodBye!!!!"
WScript.Quit
Case "Yes.", "Yes!"
msg "Cool."
Case "No.", "No!"
msg "Really?"
Case "c"
msg "Copyright 2005/2006 by (Name not given). All rights reserved. User must agree that every phrase in this program and the design will not be used in any other program. Agreed? I sure hope so."
Case "I'm cool.", "I'm cool!"
msg "No you are not!"
Case "Close."
msg "Um, I'm still beta, so please contact The creator at mrosen.9@gmail.com to suggest any ideas you have. Please tell me ideas for more words/phrases to put in. When I get up to 1,000 words/phrases, I will release it in stores."
Case Else
msg "I have no Idea about the meaning of " & Ultralongartificialintelligancemachineiscool & "."
End Select
Loop
Sub msg (message)
MsgBox message, ,"Artificial Intelligence"
End Sub

_____________________________

Definition of an endless loop:
Endless loop: See Loop, Endless.
Loop, Endless: See Endless Loop.
 
 
Post #: 1
 
 RE: Kinda Stupid Artificial Intelligence - 1/9/2006 12:28:23 AM   
  mbouchard


Posts: 1903
Score: 14
Joined: 5/15/2003
From: USA
Status: offline
Interesting, but a couple suggestions. 
- Post using the code tags, this will maintain your indentions and make it eaier to read.
- You might want to use lcase or ucase to help with your compare.  This would remove the requirement that the correct case be used.
ex. Select Case lcase(Ultralongartificialintelligancemachineiscool)
Then you would change your case below to all lower case.

-Might want to change it to use Select Case TRUE, this way you could use Instr
ex.
Select Case TRUE
   Case Instr(UltraLongThingy,"bored")>0 : msg "Too Bad"
End Select

Now the problem is checking for smaller words, like HI, that may be in one of your other intr's  One possible way around this is to not use the CASE to display your message box but to display it after all the cases have been checked.  
ex

      
Doing this, you could have a couple selects and possibly an if/then.  And essentially the one at the bottom is what is displayed.  So, HI would not be hit by a false positive.
ex.

      
Also, it might be good to capture the cancel button, here is an example of this

      

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to TheMaster)
 
 
Post #: 2
 
 RE: Kinda Stupid Artificial Intelligence - 1/9/2006 3:47:02 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
I agree that UCase and LCase are your friends. I would further suggest putting all your responses into a dictionary rather than a long protracted Select Case. Regular expresions would be a way to avoid problems with small words.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mbouchard)
 
 
Post #: 3
 
 RE: Kinda Stupid Artificial Intelligence - 1/9/2006 5:56:22 AM   
  kirrilian


Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status: offline
yea a dictionary would work great for this, you could search it for what was inputted and use the item as the response

_____________________________

Have you searched here ?
VBScript Fundamentals
My Site

(in reply to ebgreen)
 
 
Post #: 4
 
 RE: Kinda Stupid Artificial Intelligence - 1/14/2006 7:43:00 AM   
  Fredledingue


Posts: 370
Score: 0
Joined: 5/9/2005
From:
Status: offline
I'v been thinking about such software for a while.

You should set some concept and value on these concepts and answer accordingly.



_____________________________

Fred

(in reply to kirrilian)
 
 
Post #: 5
 
 RE: Kinda Stupid Artificial Intelligence - 1/14/2006 9:25:41 AM   
  Fredledingue


Posts: 370
Score: 0
Joined: 5/9/2005
From:
Status: offline
Try this!


      

< Message edited by Fredledingue -- 1/14/2006 10:25:28 AM >


_____________________________

Fred

(in reply to Fredledingue)
 
 
Revisions: 3 | Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> Kinda Stupid Artificial Intelligence Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts