

Guru
Total posts: 1081
Joined: Dec 17, 2010

One of the primary functions that any AI/chatbot should be able to perform is math.
Since computers can be great at math processing, NLP math is an excellent subdomain for exploring conversational capabilities.
For those looking to explore this area here are some inputs to start you off:
2 + 2
2 + 2=?
3,000,000+1,234
What is 2+2?
what is 2 plus 2
what is 2 add 2?
What is two and two?
What is 2  2?
What is 2 minus 2?
What is 2 take away 2?
23*3
23x3
how much is 23 times three?
After you have handled basic math it is time for more NLP oriented tasks.
Conversion of words to numbers and numbers to words.
USER:3,000,000+1,234 AI: Three million, one thousand, two hundred thirty four. USER:What is 3456 in roman numerals? AI: MMMCDLVI is the Roman Numeral for 3456.
In SkynetAI there are general routines for Algebra Word Problems.
I took inspiration from STUDENT a MIT 1964 Thesis by Daniel G. Bobrow. Marvin Minsky was the thesis advisor.
The STUDENT problem solving system, programmed in LISP, accepts as input a comfortable but restricted subset of English which can express a wide variety of algebra story problems.
If you had three apples and took one away how many do you have?
The price of a radio is 69.70. If this price is 15 percent less than the marked price, find the marked price.
Let me know how you progress.





Posted: Jun 16, 2014 
[ # 1 ]


Guru
Total posts: 1297
Joined: Nov 3, 2009

Merlin  Jun 15, 2014:
how much is 23 times three?
http://elizabot.com/entry/  Jun 16, 2014:
Judge: how much is 23 times three?
Elizabot: My calculation is 23*3 therefore my answer is 69
Elizabot has not learned Algebra yet.
http://elizabot.com/entry/  Jun 16, 2014:
Judge: 5 = 3 + x. Solve for x.
Elizabot: Adam, leash… alphabetic character, figure… infer, factorise… 5 would be: The cardinal number that is the sum of four and one.
In theory, that should be possible.
8pla.net test run  Jun 16, 2014:
Basic Algebra: a = b + x.
Solve for x.
Input integer a: 5
Input integer b: 3
5 = 3 + x.
Solve for x.
x = 2
Thanks for starting this thread. It’ll come in handy.





Posted: Jun 16, 2014 
[ # 2 ]


Guru
Total posts: 1081
Joined: Dec 17, 2010

I added some algebra a couple versions ago.
It doesn’t get much use so it may still be fragile.
USER:x+3=5 AI: x = two
USER:five equals three minus x AI: Minus two.
USER:Does two plus three equal six? AI: You tell me. Does 5= 6??





Posted: Jun 16, 2014 
[ # 3 ]


Guru
Total posts: 1009
Joined: Jun 13, 2013

“equals”. Now there’s one keyword I overlooked. Does that kind of question ever get asked?
Speaking of NLP, the only thing I’m still puzzled on is how to distinguish when e.g.
“What do 2 eggs and 1 spoon of milk make?” should be answered by “3” or “an omelet”.





Posted: Jun 16, 2014 
[ # 4 ]


Guru
Total posts: 1297
Joined: Nov 3, 2009

Don Patrick  Jun 16, 2014:
Speaking of NLP, the only thing I’m still puzzled on is how to distinguish when e.g.
“What do 2 eggs and 1 spoon of milk make?” should be answered by “3” or “an omelet”.
In terms or NLP, we may try to get an answer by reversing the question.
An omelet do make a spoon of milk and two egges taset good. An omelet does make a spoon of milk and two eggs taste good.
3 do make 2 eggs and 1 spoon of milk. 3 does make 2 eggs and 1 spoon of milk.
Ha! That is puzzling. Perhaps “3” is the answer. Since you are using digits they are a plural set. “3 [things] do make 2 eggs and 1 spoon of milk.” Had you used the number names “one”, “two”, “three” they would be singular names. “[Three] does make 2 eggs and 1 spoon of milk.”
With that said… This is still puzzling. Please feel free to fine tune the grammar rules in my comments here. I do hope they help you get started solving the only thing that puzzles you speaking of NLP.





Posted: Jun 16, 2014 
[ # 5 ]


Guru
Total posts: 1081
Joined: Dec 17, 2010

USER:What do 2 eggs and 1 spoon of milk make? AI: Tough question, let me try to find out. (Brings up Wikipedia page for French Toast)





Posted: Jun 16, 2014 
[ # 6 ]


Administrator
Total posts: 2045
Joined: Jun 25, 2010

Human: What do 2 eggs and 1 spoon of milk make? Mitsuku: A mess to clean up?





Posted: Jun 16, 2014 
[ # 7 ]


Guru
Total posts: 1009
Joined: Jun 13, 2013

Merlin  Jun 16, 2014:
USER:What do 2 eggs and 1 spoon of milk make? AI: Tough question, let me try to find out. (Brings up Wikipedia page for French Toast)
Very clever . Needs bread, though.
Given this example, I suppose that two differently named items provide more significant information than the two numbers at that point, and I could use the rule:
2 apples plus 1 (apple) = 3
2 apples plus 1 tomato = salad





Posted: Jun 16, 2014 
[ # 8 ]


Senior member
Total posts: 336
Joined: Jan 28, 2011

Don Patrick  Jun 16, 2014: “equals”. Now there’s one keyword I overlooked. Does that kind of question ever get asked?
Speaking of NLP, the only thing I’m still puzzled on is how to distinguish when e.g.
“What do 2 eggs and 1 spoon of milk make?” should be answered by “3” or “an omelet”.
‘equals’ is a particularly bothersome “keyword” how to decide if it is a direct or indirect math operator or something else (like “so we hate equals right”).
Examples of input:
I didn’t notice the change in two plus two equals four so far.
I am sure that 2+2 still equals 4.
violent anime equals emotional scaring.
Do you mean that a spoon equals the logical value true?
Well, I’ve learned false is anything that equals zero, and true is anything else.
Freedom would be deciding to say two plus two equals nine.
so we hate equals right
I wasn’t asking you to calculate… *lol* That implies that understanding equals zero, and that in turn is a good reason to laugh out loud.
i guess that equals 5 gram





Posted: Jun 19, 2014 
[ # 9 ]


Guru
Total posts: 1297
Joined: Nov 3, 2009

Elizabot is learning Algebra.
Judge: 5 = 2 + A. Solve for A. Elizabot: My calculation is 52 therefore my answer is 3
Judge: 9 = 19  x. Solve for x. Elizabot: My calculation is 199 therefore my answer is 10
PLEASE NOTE: ALPHA TEST FOR DISCUSSION.
Elizabot has just started her Algebra tutoring!
So she is most certainly still learning Algebra.
There are MANY MORE rules in Algebra she has
not learned yet, so this is only presented as an
alpha test run, for discussion purposes only.





Posted: Jun 21, 2014 
[ # 10 ]


Guru
Total posts: 1297
Joined: Nov 3, 2009

The NLP demonstration above in Algebra has been simplified for learning purposes. So, Elizabot has started showing signs of improvement in Algebra… The more advanced NLP will be reintroduced at a later stage.
Judge: solve 3x * 99 Elizabot: 33
Judge: solve 33x + 99 Elizabot: 3
Judge: solve 8 + 4x Elizabot: 2
Judge: solve 4x + 8 Elizabot: 2
Still, basic Algebra tutoring is needed.
Attention Students: Do not ask Elizabot for your math homework questions. As a new Algebra student just like you may be… Elizabot may not always get the correct answer. That’s because there is still Algebra that Elizabot simply has not learned yet, but sometimes she may go for it anyway and try her best to answer.
This Algebra demo is provided “as is”, for discussion purposes only, with no guarantee or warranty whatsoever. Therefore, any use is entirely at your own risk.





Posted: Jun 22, 2014 
[ # 11 ]


Guru
Total posts: 1081
Joined: Dec 17, 2010

“Attention Students: Do not ask Elizabot for your math homework questions. As a new Algebra student just like you may be… Elizabot may not always get the correct answer. “
Those don’t look right.
Judge: solve 3x * 99
Elizabot: 33
Why 33?
Only if you are trying to get:9801





Posted: Jun 22, 2014 
[ # 12 ]


Administrator
Total posts: 3111
Joined: Jun 14, 2010

I had more or less the same question, actually. All of those equations are incomplete, due to the missing equality ‘statement’. You can plug in just about any number and get completely different values for x. I assume that all of the equations are “= 0” (in which case several answers are incorrect, including the 3x * 99 problem), but assuming anything is rather dangerous, don’t you think?
I was going to “map out” the math to solve 3x * 99 problem, using equalities of 0 and 1, but while I’m good with math, I don’t really enjoy doing it.





Posted: Jun 22, 2014 
[ # 13 ]


Experienced member
Total posts: 84
Joined: Aug 10, 2013

If they’re supposed to be “= 0”, then I’m pretty sure they’re all correct except for the 3x * 99 one (for which the correct solution is 0). Or are there additional examples outside of this thread of which I am not aware?





Posted: Jun 22, 2014 
[ # 14 ]


Administrator
Total posts: 3111
Joined: Jun 14, 2010

You’re right, Jarrod. My mind must have been elsewhere during that portion of my response. No excuse for it, either.





Posted: Jun 22, 2014 
[ # 15 ]


Guru
Total posts: 1297
Joined: Nov 3, 2009

Thanks for tutoring Elizabot in Algebra. That’s the correct answer Merlin, Jarrod ... And, Dave is correct, that without “x=” the answers would be marked incorrect on an Algebra exam. However, restrictive natural language processing makes tutoring chatbots in Algebra easier. Unlike human students, chatbot students can be reprogrammed once the subject is mastered. Showing Elizabot’s work explains how she attempted to get the correct answer.
/* <o> <o> */
/* Algebra Addition Sign */
Judge: solve 3x + 99 = 0 Elizabot: 33
Judge: solve 3x + 99 Elizabot: 33
/* Algebra Multiplcation Sign */
Judge: solve 3x * 99 = 0 Elizabot: 33
Judge: solve 3x * 99 Elizabot: 33
Judge: solve 3 * 33 Elizabot: What was the question that? Triad, iii... cipher, figure... answer, answer... Solve would be: Find the solution to (a problem or question) or understand the meaning of.
/* Mathematics Multiplcation */
Judge: what is 3 * 33 Elizabot: My calculation is 3*33 therefore my answer is 99
/* <o> <o> */
Less than a week after Carl B, made the excellent suggestion that chatbots should know Algebra…. Elizabot, still being tutored in Algebra, has not learned to use the multiplication sign (for Algebra) yet. So, as told in advance on this thread, bound by a restrictive natural language processing for learning purposes, she assumed the addition sign (for Algebra).
/* <o> <o> */
WEBMASTER, Please have a look. Thanks!



