The Wolfram|Alpha Blog is now part of the Wolfram Blog. Join us there for the latest on Wolfram|Alpha and other Wolfram offerings »
Stephen Wolfram

Wolfram|Alpha Comes Alive with CDF

August 11, 2011 —
Comments Off

Two weeks ago we made a major announcement: building on technology that we’ve been developing for more than 20 years, we released Computable Document Format (CDF). I think CDF is going to have a big effect on the way all sorts of things can be  communicated. Because for the first time it makes it practical to include live computation as a routine part of a document.

There are many important applications of CDF that we’ll no doubt be seeing over the months and years to come. But today I’m pleased to announce an experimental one from us: Wolfram|Alpha with CDF.

sin(|x|)^|x|

Starting today, as soon as you have the free CDF plugin installed (or if you have Mathematica 8 on your system) you can go to the top right-hand corner of the Wolfram|Alpha website, and set CDF on, with the result that Wolfram|Alpha will generate not just a static web page, but instead full CDF output—that you can directly interact and compute with.

There are some immediate consequences—like rotating 3D graphics, interactively reading off values in plots, and resizing graphics inline.

But where Wolfram|Alpha with CDF really starts to get exciting is in letting you interactively manipulate parameters—and actually do computations right inside your browser. Wolfram|Alpha without CDF might just give you one particular plot. Wolfram|Alpha with CDF will automatically  sprout sliders or other controls that let you immediately change parameters, and continuously update the plot.

y'' - cosx y = x

Sometimes being able to change parameters dynamically just enriches what is already rather complete output. But often, it’s what really makes the output meaningful. Like when Wolfram|Alpha with CDF gives you controls for image processing, that let you interactively pick different features in an image.

Edge detect Abraham Lincoln image with radius x

Or when Wolfram|Alpha with CDF dynamically shows you the behavior of some simulated system.

Double pendulum

Usually Wolfram|Alpha with CDF will start off by showing you a fairly simple set of controls. But often there’s a + you can press to open up a much more sophisticated “control panel” that allows you to change all sorts of features and parameters in a computation.

sin(z) + 1/2 sin(2z)

Some of what Wolfram|Alpha with CDF does is to give enhanced interactive versions of results you’d already see some version of even without CDF. But we’re experimenting with all sorts of completely new kinds of results that only exist in interactive CDF form.

sin(z)

So how does Wolfram|Alpha with CDF work? What’s happening is that instead of the Wolfram|Alpha servers sending you HTML to be rendered by your web browser, they’re sending CDF, which in effect contains dynamically generated programs to be executed by your CDF plugin.

It’s an interesting and powerful technology stack—all ultimately based on the Mathematica language. Your query comes in to the Wolfram|Alpha servers, where it’s processed using lots of Mathematica code—that ultimately generates a result consisting of a chunk of CDF. Then that CDF is sent to your computer, where it runs using the Mathematica kernel—but now under your control, locally inside your CDF plugin.

The result of this is that you get the best of both worlds. You have access to both large-scale computational power and stored knowledge in the main Wolfram|Alpha servers, and you get highly responsive interaction from local computations on your computer.

All visible satellites

And what makes this possible is that by being based on the Mathematica language, CDF is able to describe high-level algorithmic processes in a standard way that can readily be delivered to your computer.

If one looks at different applications of CDF, some typically involve human authoring of CDF—say to create interactive Demonstrations of the kind in the Wolfram Demonstrations Project. But other applications involve automatic generation of CDF—say in producing interactive reports.

And in a sense, Wolfram|Alpha with CDF is the beginning of the ultimate kind of automatic CDF generation. You start from simple free-form linguistics, and Wolfram|Alpha automatically generates CDF for whatever you describe.

We’re only at the early stages of this right now. But already what we have is very useful—if nothing else in producing the core of what’s needed for a particular interactive CDF document.

I don’t want to confuse the technology stack even further—but there’s a case of Wolfram|Alpha with CDF that is in some ways even more powerful: Wolfram|Alpha with CDF not in a web browser, but inside Mathematica.

In a sense, this is an extension of the free-form linguistic programming that we introduced last year with Mathematica 8. But what’s new is that one’s now starting to be able to go directly from free-form linguistics to complete interactive Mathematica programs that involve constructs like Manipulate.

vary c in cos(cx)=x

For me, it’s fascinating and exciting to see these kinds of unifications in these different forms of technology that we’ve been developing for so long. And every time we do such a unification, it opens up all sorts of new possibilities that we could barely imagine before. But today’s Wolfram|Alpha with CDF is just the beginning. Over the next several months, we’ll be introducing all sorts of enhancements.

For example, as of now you have to choose to get either all-HTML output from Wolfram|Alpha or all CDF. If you choose HTML, you get to make use of the full range of optimizations in your web browser. If you choose CDF, you get to have computable CDF output that you can interact with.  In the future, CDF will automatically be interspersed with HTML, so you can get the best of both worlds.

And right now, there are only particular kinds of Wolfram|Alpha output that use dynamic interactivity with CDF. In the future, there’ll be broader coverage—so that absolutely anything that could reasonably be interactive will automatically be so.

But already today it’s exciting to see Wolfram|Alpha begin to come alive with interactive CDF output. Let us know what you think of it!

10 Comments

Wow! This is mind boggling!

Posted by vonjd August 12, 2011 at 5:38 am

It would be a lot more useful if a Linux user could actually use that… But the concept is quite interesting. 🙂

Posted by Lazza August 12, 2011 at 6:02 am

It seems that plotted funcions can no longer be enlarged which is a disaster for people who have trouble reading fine print (like this). I would prefer WA without CDF but how do get it back? G.

Posted by Gunter R August 13, 2011 at 7:12 am

@ Gunter – It’s very easy to get Wolfram|Alpha with CDF back. You can turn off CDF at the top right corner of the page. Just click the disable button on the popout that appears. This will give you the normal functionality back.

Thank you!

Posted by The Wolfram|Alpha Team August 15, 2011 at 12:17 pm

Where are the “similiar interpretations” gone? :/

Posted by Mabie August 15, 2011 at 6:21 pm

This is just the beginning. I could envision this replacing .pdf files for the interactivity and up to date information pulled from the Wolfram Alpha servers. I could see the Mathematica kernel being used as the nexus of a whole ecosystem of software. From presentation to word processing.

Posted by Robert Tinghitella August 16, 2011 at 1:26 am

Tous les utilisateurs de Wolfram Alpha vont se régaler. Je pense en particulier aux étudiants et aux enseignants, mais chaque internaute pourra à l’avenir profiter de cette fantastique interactivité. Un grand merci à toute l’équipe Wolfram|Alpha qui offre à chacun des possibilités d’apprentissage bien supérieures à celles rencontrées dans les trop nombreux sites de type «boîte à pdf» !

Posted by Bernard Vuilleumier August 21, 2011 at 5:15 am

This has incredible potential.

Posted by Sam September 21, 2011 at 10:15 am

The CDF technology will be tested with a group of adult students at benedictine and traditional students at CLC. It is clear that many students are now highly adaptable to technology, so I would like to experiment with the benefits of using these documents with both of these classes.

Posted by Christopher Ubing November 20, 2011 at 10:22 am

I wonder what added value will this new format bring into the markup space, and cannot get it after snap look at the cdf website wolfram.com/cdf

Beside, I am currently downloading the player, and noticed that the player (for linux) is shipped as 220+ MB of bash file script. That is indeed the largest .sh file on my system.

Posted by steve February 17, 2012 at 10:42 am