Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

About 50 years ago I was fascinated to see a program that could do symbolic integration. Now, programs like Mathematica can do much harder, more complex integrals.

Professor Patrick Winston pointed out that most of the AI programs we were going to look at in his class (chess, natural language, 3D vision in block world, etc.) ended up, like integration, as simple code plus a database of facts.

Back then, there was general optimism about the future of AI. No one anticipated how slow progress would be while the capabilities of the hardware grew a million-fold.

The work referenced in the article is interesting. It appears to be another small step in advancing AI. It's a small, but difficult, step like almost every other advance in AI, and I admire the work done by those working in this field.

The problems of solving simple differential equations and symbolic integration at the first year calculus level are not really advanced math. Humans solve these problems with a relatively small bag of tricks that transform a symbolic integral into a simpler form. A program can do the same thing with an even more detailed database of transforms that can be attempted at each point in the search tree until a simple solution is reached.

The article claims that the new program can solve difficult integrals. This is interesting because hard to solve integrals are often associated with real physical phenomena. See for example the triple integrals of W. F. van Peype which arose while he was studying magnetism in different materials. These, relatively, plain looking definite integrals stumped some of the world's most famous mathematicians. See [1] and/or [2] for their interesting history.

[1] Paul J. Nahin, Inside Interesting Integrals, Springer, 2015. Section 6.5, The Watson/van Peype Triple Integrals.

[2] I.J. Zucker, 70+ Years of the Watson Integrals, http://www.inp.nsk.su/~silagadz/Watson_Integral.pdf



Even that first integral is a doozy! Mathematica spent minutes on it and spat out an answer that looks much more complex than the one in the paper: Integrate[Pi * Csc[x/2]^2 * EllipticK[(-Cos[x]) * Csc[x/2]^4], {x, 0, Pi}]/Pi^3

It can't even evaluate the answer numerically, it just freezes for minutes!

Edit: about 10 minutes later it spat out 1.393203930, so it can solve the integral, but not easily.

Update: This paper reminds me why I vehemently hate modern mathematical notation, with subscripts and superscripts can mean anything at all and everyone's idea of "convention" is different. On the second page there's an algebraic expression for the solution, which at first glance seems to be:

4/Pi^2 * EllipticK[Sqrt[1/2 - Sqrt[1 - w^(-2)]/2]]^2

But this evaluates to 1.76351 not 1.39320 as given in the paper. The "K^2" in the paper is not the "complete elliptic integral of the first kind" squared, it's some other function that squares its input somehow. Or something. But that begs the question of why formulate this in terms of a function of a square root squared!?

Helpfully, they provide the definition in terms of the hypergeometric function a bit lower down, but that appears to be wrong as well, providing yet another result if evaluated numerically.


The difference lies in the definition of `EllipticK` which uses quantity `k` whereas the paper uses `k^2`. Also, symbolically integrating in Mathematica is much slower. Instead use `NIntegrate` to skip straight to a numerical value.

Print[ NIntegrate[ 1/(1 - Cos[x] Cos[y] Cos[z]), {x, 0, Pi}, {y, 0, Pi}, {z, 0, Pi}, Method -> "LocalAdaptive"] / Pi^3 // Timing]

{0.121543, 1.3932012917627028}

Print[ NIntegrate[ Pi Csc[x/2]^2 EllipticK[-Cos[x] Csc[x/2]^4], {x, 0, Pi}] / Pi^3 // Timing]

{0.021917, 1.3932039076998044}

Print[ Gamma[1/4]^4 / (4 Pi^3) // N // Timing]

{0.000029, 1.3932039296856769}

Print[ 4 / Pi^2 EllipticK[1/2]^2 // N // Timing]

{0.000375, 1.3932039296856764}

For `NIntegrate` the default method is `GlobalAdaptive`. You can try different methods and rules to optimize for the function and bounds.


My guess was that the symbolic output of Integrate could then be evaluated to much higher numerical precision in a reasonable time, but I couldn't transform the result using simple Mathematica operations into something tractable.

It's a bit of a challenge to get either the first or second forms you provided to converge if requesting 10 or 15 digits of precision. However, your third form involving the Gamma function evaluates to very high numerical precision quickly. I can get 1,000 digits in under 50 milliseconds, which is "good enough"!

Your usage of NIntegrate tuning options shows a few things:

1) That these days I only use Mathematica as a glorified calculator, evoking a mental image of a 500-ton press being used to crack walnuts.

2) Even the best symbolic CAS in the world isn't magic, and requires hand-holding.

3) With the right knowledge even a very hard nut can be easily cracked!

I wonder why Wolfram Research hasn't added some basic multi-threading capabilities to Mathematica to try different "flags" in parallel, racing the various approaches on each CPU core to see which one wins...


Wouldn't any solution result in a new trick to add to the bag of tricks, and then make the symbolic programs for integral calculation surpass again?


Honest question. Are you fearful of the moral implications of AI? Whenever I hear someone that is fascinated about AI and only thinks about it as an intellectual pursuit, I’m curious if they are thinking at all about the consequences of powerful AI.

From where I sit, the bad outweighs the good.


I'm fearful, but I also know that if I don't build it, someone else will. And I'd prefer it would be me.


Things looked very different in the early 1970s; that's when I took my first AI class. Now, naturally, I worry about technology that can such deep and broad impacts on humans. Back then most of my programming was on punch cards submitted to mainframe operators behind a glass window.


These types of worries always strike me as worrying about keyhole surgery going wrong, before we are capable of making scalpels, anasthetic, or even video cameras -- or hell, before we even know what a tendon is or what the purpose of blood is. Or worrying about the challenger 2 explosion when we can't even make gunpowder. Or worrying about the logistics of flying cars in three dimensions and traffic crashes before we are even able to build a boiler engine to drive a train.

We are so far away from GAI at the moment that I don't for one second actually worry about the moral implications of General Artifical Intelligence.

I don't see the point in worrying about something when we know literally nothing about that thing, and barely have a path to making it. It's very likely that by the time we are capable of making GAI (Excusing the very probable idea that we will be able to simulate a brain, but not at any proper speed -- see the three body problem and the challenges with simulating literally any other physical systems), there will be half a dozen problems we do need to worry about, that we cannot forsee. There will also be half a dozen limitations that mean that our current worries are essentially worthless. It's the same with all new technology.

It's also interesting that people who tend to worry about GAI never worry about current levels of AI, especially in a military context. They seem entirely unconcerned with being worried about literally crappy and half-baked neural networks being deployed for use in drones. They seem entirely unconcerned with the lack of proper dataset balancing and sorting that ensures that current AI models do not have racial bias (or, indeed other types of bias).

Just last year I saw a twitter post about a startup that was re-creating literal phrenology, using AI to try and profile whether people were criminals or not based on facial shape. The typical Less Wrong / MIRI folks never seem to be worried about that, no, they spend their time in fear of Roko's Baselisk and other currently-impossible scenarios. They literally purged posts, threads, and comments that made any mention of that under the utter and complete fear that maybe in the far flung future a very bad simulation (Unless, their brains are cryogenically frozen, I guess, but it's very likely that brain structure would degrade under the immense timespan anyway) of them would be tortured for their current actions, by a good AI, that had apparently gone so insane that it thought that torturing low-fidelity simulations of people in the future could affect the past and cause it to be created faster.

Speculating about the future can be a positive thing, but I don't see how this is at all useful or healthy.


You can’t imagine any reason to worry? At all?

Worrying about the future of surgical technology is very different. The end goal of surgery is to save a life or improve the quality of life, and it involves restoring a single person back to working order.

The end goal of AI is to _think_. The upper bound on that is horrifying. Once something can think it can build. Once something can build it can multiply. The upper bound on AI is replacing the human species.

I’m not saying I’m nervous about this happening next year. I know how terribly inept we are at true GAI. I’m thinking purely abstractly, and in that light I think we should more serious about ground rules for AI.


Can you re-read my post more closely and actually critique it. You chose one of my points, arguably the weakest (partly because it's an analogy -- analogies are mostly for flavour, they don't make a good argument but they help you to appreciate where I am coming from) and ignored the stronger criticisms I posted after that.


Why is the upper bound on thinking horrifying? We are currently the upper bound within our own domain, and on the whole, we've been getting better as we lifted that bound.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: