Wolfio

Inspiration

After math class one day, my friend pulled out his phone to check the solution to a problem using WolframAlpha's website. He thought to himself, "how cool would it be to text your math problem to a number, and get the answer texted back."

What it does

Wolfio introduces a breadth of math-related capabilities to users without an internet connection. The user sends an SMS to our Twilio server, we parse the message, and call our personally made Wolfram API that return results as text expressions, which Twilio sends as an SMS back to the user.

How We built it

We used a Flask server in conjunction with Twilio's web service that allowed us to send and receive text messages from users. The server was written in Python, and would receive a text caller_id and body. The body would contain a syntactically-correct string that would be parsed by our server, and depending on what mathematical function the user specified, a certain call to a hand-made Wolframcloud API would be made.

We used Wolfram's Development Platform in order to create our own API using Wolfram's mathematical functions as a base. For the length of this hackathon, we were able to support functions such as derivatives, integrals, multivariable integrals, limits, summations, matrix multiplication, inverting matrices, solving a system of equations, and more—all without internet for the user.

Challenges I ran into

I would say our two biggest challenge lied with 1) getting accustomed to the Wolfram Development Platform language. Luckily, there was a Wolfram sponsor/employee at the hackathon, and he was able to give us great tips on how to customize our Wolfram APIs. Our second biggest challenge was with parsing multi-function input (for instance, calculating the derivative of 5x and then adding that to the indefinite integral of x^2). This required making a Python parser. Our syntax currently revolves around using a function name, followed by a colon, and the user's expressions/parameters wrapped in parentheses. Ex: Derivative:(5x^3, x, 2). This would take the second derivative of 5x^3 with respect to x.

Accomplishments that I'm proud of

We are proud of being able to make a fully functional offline calculator for anyone with a connection to a cell tower. The potential for such a wide-spreading knowledge base and mathematical power is unbelievable. People in developing countries with cell service now have access to a world-class mathematical computational powerhouse. This is just the kind of jumpstart in information accessibility that the world needs.

What I learned

We learned how to make a successful app using Twilio's Flask server, and integrate it (no pun intended) with WolframAlpha's customizable APIs. I got a better feel for how Python is able to parse strings, and return meaningful information. I also am much more comfortable using the Wolfram Development Platform to create custom functions and APIs.

What's next for Wolfio

The best part about Wolfio is that it can comfortablly scale in its functionality. We only had a short number of hours to create an already sturdy list of mathematical functions. As more time is put into this project, more of WolframAlpha's knowledge base can be made easily accessible to aspiring mathematicians and doers around the world.