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 Type VI
 
 

The Type VI RICH is online.
http://ai.r-i-software.com/TypeVI/
Im still wringing out some details, but in the meantime there are some features that might be fun to test. The updated Math module will now handle complex equations. Typical abbreviations such as sin cos as well as π and c for speed of light are recognized, and standard rules for grouping terms are followed. The format is ;

solve x = 10 x (c / 2) + 5

(Should also recognize variations such as “can you solve [equation] )

Will also recognize english versions of simpler equations such as

“what is one hundred and one plus two”

I havent found the boundaries on what will or wont break yet, so have at it and have fun!

Vince

 

 
  [ # 1 ]

Vince, I’m sorry to say that I broke it. you did say complex equations, did you not? cheese

User: Can you solve x = 4 % 2
Vince: What if I said I taught myself how to solve x = 4 % 2 just last year. Youll have to excuse me, sometimes I fall back on things that Ive heard elsewhere.

I also tried POWer (^) in place of MODulus (%), with similar results. so I take it we’re talking more about compound equations, as opposed to complex ones? wink

Oh, also of note, the responses took an average of 25-30 seconds to show up. Probably my fault, for trying something that I had a feeling would fail (most folks don’t include support for “non-standard” arithmetic operators).

 

 
  [ # 2 ]
Dave Morton - Jan 8, 2013:

Vince, I’m sorry to say that I broke it. you did say complex equations, did you not? cheese

User: Can you solve x = 4 % 2
Vince: What if I said I taught myself how to solve x = 4 % 2 just last year. Youll have to excuse me, sometimes I fall back on things that Ive heard elsewhere.

I also tried POWer (^) in place of MODulus (%), with similar results. so I take it we’re talking more about compound equations, as opposed to complex ones? wink

Oh, also of note, the responses took an average of 25-30 seconds to show up. Probably my fault, for trying something that I had a feeling would fail (most folks don’t include support for “non-standard” arithmetic operators).

Hey Dave!
As it stands the parser recognizes syntax that would be equivalent to standard programming syntax, so as it stands it wouldnt recocgnize 4 % 2 as meaning 4% of 2 . It would recognize (2 / 100) * 4
HOWEVER!!!
Its extensible so I should be able to add a substitution that tells the parser to recognize [value] % value] as meaning (x / 100) * y
Im going to give it a try. I hadnt thought of that one, but it should work! (theoretically LOL)

Did you use Mod(x) ? Should recognize this. If you actually used “Modulus” it would have broken but I can add a substitution that will do the same thing!

From the response you recieved Id say that it didnt recognize “Can you solve” even though it should have. Sounds like it failed to recognize the demand to solve the ewuation and went to the Internet to try and find something to say.  Better stick to “Solve [Equation]” until I sort that out.  If it hits the correct module but cant solve it should say something like “Sorry, I recognized that as an equation but couldnt solve it. Check your syntax”

RE: Response time
Yeah, my old server is about at the outside limit of what it can handle. The new architecture loads modules dynamically which greatly reduced the initial load time, but added to the response time per question.

Vince

 

 
  [ # 3 ]

LOL Well not sure if I agree with the answer, but its on the right track

User: solve x = 4 % 2
Vince: I think thats 0

Probably rounded but I think we can sort that out!

Vince

 

 
  [ # 4 ]

Actually, I used standard PHP arithmetic operator for modulus (%),  and I used what is generally accepted for denoting “power of”, which is (^). So “four to the 2nd power” is generally written in an equation as 4 ^ 2

If those had not “broken” the response, I would have tried the numeric equivalent of “what is three times ten to the sixteenth power”, or:

x = 3 x (10 ^ 16)

The answer, of course, being 30,000,000,000,000,000. From there, I had some rather esoteric math in store (did I mention that I’m evil? raspberry ), so things to look out for:

1.) The value of PI in an equation (e.g. R = 15, C = 2 x PI x R, what is C?)
2.) Square roots (e.g. “what is the square root of 9”, or “solve x = SQRT 9”)
3.) Euclidean Geometry
4.) Calculus

Ok, ok, the last 2 are a joke. cheese

I’ll make sure to stick to “solve [x]” until you get the input matching completed. Still in all, I’m satisfied with the results, so far. smile

 

 

 
  [ # 5 ]
Vincent Gilbert - Jan 9, 2013:

LOL Well not sure if I agree with the answer, but its on the right track

User: solve x = 4 % 2
Vince: I think thats 0

Probably rounded but I think we can sort that out!

Vince

Nope! The Modulus of 4 divided by 2 is, indeed and in fact, zero. Good answer! Try 4 % 3, it should be 1.

 

 
  [ # 6 ]

Failed inputs (not perfect input):
User: 3+4?
Vince: You know, speaking in unrelated one word sentences is not a very encouraging sign of intelligence wink

User: solve x=three plus three plus one
Vince: I’m thinking you tried to inject Malicious code. Not cool man.

User: What is three plus three plus one?
Vince: What If I said Yah (Actualy I heard that somewhere, sorry If it didnt make complete sense. )

User: solve 3+3
Vince: Sorry, I know that was an equation but I had a problem with it. Check your syntax.

Successful inputs:
User: solve x=3+3
Vince: I think thats 6

 

 
  [ # 7 ]

When testing, I tried to put spaces between the numbers and operators, in an effort to make it easier for RICK to process the inputs. The though behind that was to test functionality over parsing first, then to test the parsing bit after. smile Still, though, I’m glad that both were being tested “in parallel”.

 

 
  [ # 8 ]

Good job guys! There is method that “expands” simple equations so that 2x2 becomes 2 x 2, but for complex equations RICH relies on you using the spaces. Back to the same problems with NLP, detecting the difference between 2x4 (=8) or 2x4 a piece of lumber.

“You know, speaking in unrelated one word sentences is not a very encouraging sign of intelligence”
There is a module that attempts to detect anamolous speech, so if a judge tried to “trick” the AI by simply saying “cat” or “black” it will trigger that response. So when you typed 3+4? without qualifying it , it triggered that resonse. I think Ill change the languge for the response to something less ...irritating? as this seems to get triggered falsely quite a bit. The Type5 had a bug that would cause it to get stuck on that response and that pissed people off no end LOL The idea with these modules is to try and begin to develop a sense of what a “normal” conversation looks like.

what is 3+4? should have worked

When you use “solve” you hit what is the scientific module, if you use english words that it does not recognize as math it assumes that your trying to “inject” code and triggers that response.  Im not sure why that triggered, on the face of it your syntax should have parsed, Im going to use your exact syntax on the desktop (easier to debug) and see what happened.

“What is three plus three plus one?” Hits an entirely different module and should work. Let me make sure that its on the list of modules that are available and see what happened. As in the earlier example Im thinking that it didnt hit the module as this response sounds like the AI tried to find an answer on the Internet rather than it having triggered the math function.

“solve x=3+3” Hit the previously mentioned expansion method and so it flew.


Thanks for the help!  (you will never ever ever be able to break your stuff the way someone else can wink

Vince

 

 

 
  [ # 9 ]

Dave,

Tried the same thing and I got this

User: solve x = 4 ^ 2
Vince: I think thats 16

Vince

 

 
  [ # 10 ]
Vincent Gilbert - Jan 9, 2013:

Thanks for the help!  (you will never ever ever be able to break your stuff the way someone else can wink

I agree. I spent a lot of time on Skynet-AI’s math parser, and still I find edges that I have not fully covered:

AI LOG:
USER:solve x 2
AI
: If you solve your own problemsit will make you a stronger person.
USER:solve x 4^2
AI
Sixteen

The only difference being spaces around the “^”.
There is nothing like good users to help you identify your limitations.

 

 

 
  [ # 11 ]
Vincent Gilbert - Jan 9, 2013:

Dave,

Tried the same thing and I got this

User: solve x = 4 ^ 2
Vince: I think thats 16

Vince

Well, four to the second power is 16, so that sounds right. I’ll give RICH a more complete test after dinner (it’s my night to cook, and we’re having something I call “SOS pie”). If I find anything untoward, I’ll let you know. smile

 

 
  [ # 12 ]

Tried the composite syntax and it seems to work so long as you use the spaces

User:solve x =  2 * 2 plus one plus one
Vince: I think thats 6
User:solve x = three plus three plus one
Vince: I think thats 7

Which is cool since it wasnt designed for this exactly!
Looking forward to developing this more. Im thinking that I should add some input processing to detect whether the x = has been left off and adjust accordingly.

@Merlin I tried the Skynet AI math parser and I was quite impressed!


Thanks again
Vince

 

 
  [ # 13 ]

Just a quick note.

the load time issue seemed to be largely due to my having incorrectly mapped the log path when I transferred the desktop app to the web app. Each text sent was causing the app to perform about 50 searches for a file that wasnt there. Anyway, much better now. Still tweeking the transfer to webapp, theres some additional syntax for the math module that Ill have up later that lets it do some neat stuff.
Vince

 

 
  [ # 14 ]

Cool! I’ll be sure to check it out on my next break. smile

 

 
  [ # 15 ]

Hey Dave
Sorry this took a while. Here is the extended syntax

solve § where y1 § y1 = 10 § x= y1

basically the § allows you to break up concepts. you should be able to place these on seperate lines something like

User: solve §
where y1 §
y1 = 10 §
where y2 §
y2 = 20 §
x= (y1 = y2)

RICH: I think thats false

Vince

 

 
  login or register to react
‹‹ Chatlogs available online      Avitar(s) ››