04-24-2003, 10:44 PM
Here is program output that I made for my AI class. It is called the "Calcugator" It's supposed to think like a human to solve arithmetic problems. Do you think this could have any application in the education programs industry?
Initially, I created a standard, linear way of solving problems. Then I expanded on it to preferentially solve available subproblems (those that can be solved in any one stage according to the rules of mathematics) and expand out numbers based on computational cost criteria.
I will upload the source and documentation if anyone's interested. (LISP)
Code:
(show.reduction "5/2 + 7 - (9 - (6 - 9 * 5 + 2 * 45)) + 44 * 99 - (3 / 7 + 999)" 1)
5/2 + 7 - (9 - (6 - 9 * 5 + 2 * 45)) + 44 * 99 - (3 / 7 + 999)
5/2 + 7 - (9 - (6 - 9 * 5 + 2 * 9 * 5)) + 44 * 99 - (3 / 7 + 999)
5/2 + 7 - (9 - (6 - 9 * 5 + 2 * 9 * 5)) + 44 * (90 + 9) - (3 / 7 + 999)
5/2 + 7 - (9 - (3 * 2 - 9 * 5 + 2 * 9 * 5)) + 44 * (90 + 9) - (3 / 7 + 99)
5/2 + 7 - (9 - (6 - 9 * 5 + 2 * 9 * 5)) + 44 * (90 + 9) - (3 / 7 + 999)
5/2 + 7 - (9 - (6 - 45 + 2 * 9 * 5)) + 44 * (90 + 9) - (3 / 7 + 999)
5/2 + 7 - (9 - (6 - 45 + 2 * 45)) + 44 * (90 + 9) - (3 / 7 + 999)
5/2 + 7 - (9 - (6 - 45 + 90)) + 44 * (90 + 9) - (3 / 7 + 999)
5/2 + 7 - (9 - (6 - 45 + 90)) + 44 * (90 + 9) - (3/7 + 999)
5/2 + 7 - (9 - (-39 + 90)) + 44 * (90 + 9) - (3/7 + 999)
5/2 + 7 - (9 - (-39 + 90)) + 44 * 99 - (3/7 + 999)
5/2 + 7 - (9 - 51) + 44 * 99 - (3/7 + 999)
5/2 + 7 - -42 + 44 * 99 - (3/7 + 999)
5/2 + 7 - -42 + 44 * 99 - 6996/7
5/2 + 49 + 44 * 99 - 6996/7
5/2 + 49 + 4356 - 6996/7
5/2 + 4405 - 6996/7
8815/2 - 6996/7
47713/14
Initially, I created a standard, linear way of solving problems. Then I expanded on it to preferentially solve available subproblems (those that can be solved in any one stage according to the rules of mathematics) and expand out numbers based on computational cost criteria.
I will upload the source and documentation if anyone's interested. (LISP)