AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

RICH Logic - Games
 
 

Some of the Logic modules have made it into the online version. In addition to the usual, RICH can play several basic logic games and while I was building the “tic tac toe” module I was thinking of how boring the actual interaction is. If no one makes a mistake in logic the game is a draw. Not much fun. So I decided to give RICH a function not usually seen (at least as far as I know, if someone else knows of something similar please share!) . The module works pretty much the same as most, there is a NO_LOGIC mode which allows the user to win and a USE_LOGIC mode which employs logic to block a winning move.  HOWEVER…there is a third mode which im calling ALTER_OUTCOME. With this flag set, If RICH is playing in NO_LOGIC mode and he detects that the user is about to win….he cheats. When the user inputs the winning move, RICH alters the game token assignments so that X=O and O = X and RICH proclaims himself to be the winner. Im thinking that this ought to provide some hysterical dialogue. Something along the lines of;

User: You cheated
RICH: No I didnt
User: Yes you did
RICH: Did not

Im hoping to have the games online by today or tomorrow, but thought Id share this now just for giggles.

Vince

 

 
  [ # 1 ]

Vince, you’re about as devious as ... well, devious, at any rate. I’m eagerly anticipating the initial argument with Rich over his “creative use of reality alteration”. cheese

 

 
  [ # 2 ]

I like it! I wrote a similar thing in Mitsuku where she can appear to play 20 questions (20q.aiml).

http://www.square-bear.co.uk/aiml/

Mitsuku thinks of an object and you can ask a maximum of 20 yes or no type questions to try and work out what she is thinking of. However, it’s just a random yes or no generator plus any question that starts with “is it a…” results in a no.

It’s just a bit of fun and some of the user’s responses are pretty funny once they realise what’s happening. I added a few comebacks for Mitsuku to defend herself which is fun for me too.

Mitsuku: Ok, the object I am thinking of is classed as a vegetable. Please ask your first question.
User: Is it green?
Mitsuku: Yes it is.
User: Is it a lettuce?
Mitsuku: No, sorry. Ask me another question about it.
User: I give up
Mitsuku: You give up? I was thinking of a carrot!
User: A carrot is not green.
Mitsuku: It would be green if it had gone mouldy.
User: @$#*!!!

 

 
  [ # 3 ]

See…thats great!

Not only is it hysterical, but precisely because of that it is a serious bit of AI I believe. It constitutes a definite break from machinelike behavour. Definitely feels human. Kudos!

Im still attempting to get this up today or tomorrow, but I had a last minute idea that Im trying to implement. Because of the spartan nature of the RICH WebUI, I thought I would have to settle for strings of text as the result. Basically the Tic Tac Toe logic numbers the squares left to right and top to bottom so that X=1:O=2:X=4 would translate as

XO-
X—
—-

and that was the output, which would no doubt delight the geeks (yeah us) but was less than satisfactory overall. Then it hit me that I could just add a link to a seperate display, so I wrote this

http://ai.r-i-software.com/TypeVI/tictactoe.asp?gamestate=X=1:O=2:X=5

Now that I see this, theres no reason that I cant do the same thing with the chessboard, but the time necessary to create the graphics is prohibitive to getting it up on schedule. Im thinking that Ill just add the code to generate the link and just link it to a message page saying “coming soon” or something.

Vince

 

 
  [ # 4 ]

If you programmed your site in PHP I could provide a script to create the boards (TicTacToe or Chess) “on the fly”, but I’ve never used ASP, so I can’t help you there. Imagine using an <img> tag instead of a link. smile

 

 
  [ # 5 ]

Not a problem Dave!

The page game display WebUI is not associated with the session state but accepts a querystring with the gamestate information. In fact the game display WebUI doesnt even have to exist on the same server, although I do have PHP installed. I would be proud to have a “Dave Morton” original included if you have time. Ill email you later with details on the gamestate string construction. About the image,  Your right of course, and thats what the large blank area on the Main WebUI is for ultimately. Maps, game data, etc…The capability is built into the main architecture, and .net has a great lib for manipulating images, just a matter of “hours in the day” LOL

Vince

 

 
  [ # 6 ]

“Hours in the day” is right! smile But the challenge of creating a chess board image script is calling to me with an attraction that is undeniable. Let’s revisit this after the conference, and I’ll give the idea the attention it deserves.

 

 
  [ # 7 ]

OK. took a bit longer, but its up. Expert mode is disabled until after I debug the conversations a bit.
Should be fairly robust in what syntax it accepts during dialogues. For instance, it should respond to most affirmative responses when responding to “Are you ready”, you dont have to answer with the exact phrase “im an expert” just something containing a reference to that phrase.  Im going to build up the “You cheated” banter a bit, but its pretty funny. [note” to disable the ALTER_OUTCOME flag, add “dont cheat” or something like it to the response to “How do you want to play” EXAMPLE: “Im not an expert…and dont cheat this time” or something like that should work. Anyway, Ive only done a cursory debug, so there are no doubt plenty of gaps to discover!

Heres a sample. [RICH refers to the user as “Whats your name” until it recognizes some sort of introduction]

What’s your name: would you like to play tic tac toe
Vince: Sure! You be ‘O’ Ill be ‘X’. Input commands like this O=1 where the squares are numbered left to right and top to bottom. Are you ready? (Dont enter any commands yet, just let me know if your ready)

What’s your name: sure
Vince: Before we start, how do you want to play? you can say “im an expert” or “im not an expert”

What’s your name: im not an expert
Vince: OK, remember, enter the commands like this, O=1 (or whatever square you want your token placed in.Here is the board Game Board .

What’s your name: O=1
Vince: My move is X=2 Here is the board Game board

What’s your name: O=4
Vince: My move is X=3 Here is the board Game board

What’s your name: O=7
Vince: X wins! Here is the board Game board

What’s your name: you cheated
Vince: No i didnt

What’s your name: yes you did
Vince: Yes I did. . . What?

What’s your name: you cheated
Vince: No i didnt

What’s your name: you didnt win
Vince: Yes i did

What’s your name: cheater
Vince: Baby

What’s your name: im leaving
Vince: Ok, lets move on.

 

 
  [ # 8 ]

Vince and Steve those games the way you have set up, are both very funny indeed. W.T.G.  :D

 

 
  login or register to react