Saturday, February 26, 2011

Our first presentation

Hey,

Sorry not too much has been happening in this project so far, we've had a bunch of exams/job applications going on this month. But as a lot of this is getting wrapped up for now, so hopefully you will start to see updates more often.

We gave our first presentation of the semester about a month ago, and followed with several two-week goals. These were:

Design and implement a user interface
Correctly format input
Define rules for one-sided arithmetic

On the first, we hoped to use Mathjax as our interface. However, though we could display our equations, getting feedback on what terms were clicked, where they were moved, etc. was proving difficult. So instead we hoped to write our own displayer. We were able to construct an xml string from our backend, but we're still tinkering with a nice display/feedback to the backend.

The third is to avoid writing specific code for each case, much like what happened our first semester. This has been done by determining which operations will be supported, and what common rules govern them. We hope to implement:

Commutativity (a+b -> b+a)
Distribution (a(b+c) -> ab + bc)
Factoring (x^2 + 2x + 2 -> (x+1)^2) and vice versa
Logarithmic operations (There's several of them)
Variable combination (2x + 3x -> 5x)
Solver

So far, most of these rules have been defined, and we hope to write them up as soon as possible.

That's all we have to say for now, but you'll hear from us soon

Zach and Joe

Monday, January 31, 2011

New Year, New Code

School officially started about a week ago, which means Touch of Math is back in full swing. We have a new member, Zach, who will help out on the front end of things. Our goal is to use MathJax to render our equations. We plan to add a ton of new gestures too, including those for one-sided manipulations (distribution, association, logarithms?, etc).

On the back end side of things, we're looking a a totally new data structure. Currently in use is an n-ary tree that replaces our original binary tree. This removes a lot of the problems we were having with subtraction and division, as well as allows easier use for operations that aren't binary.

Also, we've been putting significant time into a lot of the suggestions that were given to us over last semester. Most notably, look for a history/undo feature, and custom features later on. We've already got more math than just +,-,*,/, and we plan to add higher mathematical operations still.

That's really all for now, we're looking forward to another great semester of development. Our newest code is here, and our original can be found here.

Thanks again!

Thursday, December 9, 2010

The Last Presentation of the Year

Hey,

So we gave our final presentation of Touch of Math last Friday. You can see the Prezi (which worked this time!) at http://prezi.com/wogbvom-nhxy/touch-of-math-2/ and our latest code can be tested here: http://touchmath.dyndns.org/multitouchdemo/demo2.html

So the presentation, I'd say, was a success. Most of the algebraic math is there, there's just a few small kinks to work out. We also introduced our newest feature, merging, which gives us some evaluation methods. We hope to build on this as much as we can.

As last time, we got several more ideas to implement, including a history, higher order math, etc. They're all excellent ideas, and once we do some more bug-fixing, you'll start seeing them worked in.

Also, next semester we may have another developer working with us to help with our front end stuff. I don't want to say too much more about it, since nothing's final, but I'm really excited to work with him in the Spring.

That's all for now, we'll keep you posted through the winter of anything new going on with Touch of Math.

- Alex and Joe

Friday, October 29, 2010

Getting There, and a contender: Mathination

Hi all,

This Saturday Joe and I will be doing a demo. Check out
the current release at http//touchmath.dyndns.org/demo/demo.html.

These are the current features:
- *, /, +, -
- swapping additive groups
- swapping multiplicative groups
- limited evaluation

These just need a few touchups and the core math is finished.
We'll be improving these with some multi touch gestures and
keyboard input for the desktop. The next step will be getting
this out to some people to play with.

If you've been reading, we've shifted plans. Earlier this week
we discovered that, on the 15th of October, Matthew Self published
his iPad Mathination software.
We haven't played with it yet, but it looks quite good. Kudos to
Matthew Self for releasing first viable contender in the touch-math space.
This is exactly what we had in mind at the start of our project in September.

Before discovering Mathination, we were gearing up to abstract our
tree manipulations to a more functional approach that decouples
operators from code, and lets you define new operators without writing
more code.

But this will have to wait for now. Matthew Self's project puts some pressure on us to get basic algebra finalized ASAP. And I feel confident that we will bridge this gap, pending aesthetics, just momentarily.

Once we do this, we're interested in getting this software out to people learning and teaching algebra. They'll want prepared problems, history, and hints.


Thanks for reading,
Alex

PS you can see it in action here: http//touchmath.dyndns.org/demo/demo.html.
And you can pull the code here: github.com/adc/digiti

Friday, October 22, 2010

Today's Presentation

Hi, Alex here.

Today we hit our second presentation.

After giving up on our prezi, we decided to jump to demo. Joe passed around his iPod touch and showed people the demo on the projector, and walked them through the features.

Here are a few quotes:

Alex (confused): "Why are you guys laughing?"
RCOS "It's cool!"

Alex : "And , I'd like to than Joe. Work with a math major! They make good partners"
Joe (CS) : "I'm not a math major!"


We got TONS of feedback, and we really appreciated the interest and enthusiasm. It feels to me that the project is on the right track.

Okay so before we had this: http://touchmath.dyndns.org/demo0/canvas_test.html.
It looks okay, but it's pretty awkward and has a bunch of errors. Joe fixed fixed all of this with his grouping implementation: http://touchmath.dyndns.org/demo/demo.html. Check it out. This is really nice!

This definitely makes my week. Way to be

Feedback
- Add a history! (Brendan Ashby)
- It'd be great to add recursion operators! (Genesis emulator dude)
- Add calculus, limits, summations (Peter Hajas)
- Add diffeq! (Graylin)
- You should get some users. See what younger kids think (Moorthy)

Minor fixes that should be done:
- improved parenthesis
- cleaning up "1"s in division and multiplication
- adding exponents

Major things
- evaluation?
- new gestures
- generators for resolving equations

Friday, October 15, 2010

Doing things smarter

Ok, so we have a basic thing going. Soon enough gestures for multiplication, division, and factoring will be in.

Right now they're being done on a case-by-case basis though. That's not too good. It's really bad actually. Instead we should be doing all of this with a solver.

A solver is something that recursively applies algebra rules until it reaches a desired form. Here's a link to javascript->prolog (http://ioctl.org/logic/prolog1). That's basically all we need.

This is really a math problem, which declarative programming can be rather good at. So what should queries look like?

Part of the difficulty is just identifying what needs to be solved. The user makes some gestures involving different symbols. For simple additivity this is taking a symbol, a for instance, and trying to get it on the other side of the the '=' operator.

So, a recursive solver would just start going through possible operations on a that may lead to this. A Prolog-like approach would be especially good, with cuts and all that jazz. But aah, that link doesn't have cuts. hMmmm. But, what's this? OMG http://yieldprolog.sourceforge.net/
That looks quite promising. As does this project. Awesome!

Thursday, October 7, 2010

Addition

Hi,

A basic proof of concept Joe and * made is floating online.


Currently only addition is supported. We're still thinking up the gestures for dealing with products and divisors.

Joe has also gotten Safari Mobile compatible event recognition going over here: touchmath.dyndns.org/movement_test.html . On the todo list is abstracting our javascript events for supporting loads of different html5 capable browsers and devices.

To use the interface, input an infix expression. It gets converted into an expression tree. And as you manipulate symbols in the infix equation, the underlying expression tree readjusts to match what you're doing. If the tree doesn't like what you're doing, syntactically or algebraically, it will resist the change. Otherwise it will give you the go ahead.

Once products are together, we'll add in exponents, then combine the blocky shapes into a more aesthetic form.

One thing to note at the moment is that the algebraic expression manipulations are not very formally defined. This is something we're saving for a second iteration through this stage. As an end of semester goal we're looking to fully support +,-,/,*,^, and parentheses. These are pretty trivial, and should not require a highly formal approach.

As we prepare for adding in calculus and other cool math, the semantics become more complex. It'd be great to create some grammars that can take care of all these things

Some dangling thoughts and questions for our readers:
1) Currently, we're not using any libraries. Are any out there recommended? Should we use prototype.js? JQuery? What about building a desktop app with node.js?
2) There doesn't seem to be a mouseUp event in Safari's mobile touch...whaat
3) Any good papers on computer aided interactive algebra?

Thanks,
Alex & Joe