Funhouse Mirrors! 

Interviewee: Hamish Todd, AI Researcher 

When preparing for this interview with you, we did some online research and were surprised – amongst other findings – that you call the cross product an obsolete operation. 

Oh, yes completely!  And it shall be my privilege to elaborate on that.  Listen, the cross product mixes up two different kinds of object.  

Let us say the video game developer, engineer, physicist and all that often need translations, rotations and maybe occasionally a reflection.  And then we have this thing that we have in three dimensions called a vector – that’s a word that I really very hard try not to use, you might have noticed I almost never used it during my lecture! 

I don’t use it because the word ‘vector’ confuses people: there are so many things that people do with vectors that it gives them the impression it is consistently about the same ‘vector’.  In this way, they end up thinking that, for instance, a rotation and a translation are basically the same kind of thing. But if you look down in 2D, you see that translations have two degrees of freedom, while rotations have only one degree of freedom, whereas in 3D both translations and rotations enjoy three degrees of freedom. 

Now, coming to the cross product: this operation on ‘vectors’ badly mixes up translations and rotations.  Hence you find lengthy Wikipedia articles discussing ‘polar vectors’ and ‘axial vectors’ and that kind of silliness is purely because of the cross product.  While, if you walk the proper Geometric Algebra way from the beginning, you understand that some ‘vectors’ are planes, other ‘vectors’ relate to translation, distinguished from again other ‘vectors’ relating to rotation.  And instead of taking the cross product in Geometric Algebra you take the intersection of these planes, essentially, so the output has a different type than the inputs. (Note: Hamish’s answer situates itself in the Projective Geometric Algebra space). 

Would you say that the alternative provided by Geometric Algebra is conceptually more consistent or more performant in a way when applied? 

Those are two different questions. 

First, about conceptually clearer, in my opinion: yes.  I must admit that “vectors” (again, bad word!) allow things to seem conceptually simpler for a beginner. But when you start doing anything remotely challenging, vectors become a hindrance.  It’s like wanting to keep training wheels on your bike forever. They’ll get in the way of you riding better bikes. You wouldn’t want that. So once you reach the point where you start thinking about combing reflections into rotations, or rotating around lines that aren’t through the origin, you’ll find Geometric Algebra is more conceptually clear. 

Secondly, in terms of performance, Geometric Algebra is more than often the performant thing to do. There are some situations where Geometric Algebra seems not as performant. Though those are few. If you want the best performance out of your game engine, you are better off learning Geometric Algebra – even if you do not care about conceptual clarity! 

Don’t you think that it is – sadly enough maybe – way harder to convince commercial game companies today to switch from Linear Algebra to Geometric Algebra? I mean, what would have happened if they had done that from the start? That would then have been in another world, of course, which has not ignored but embraced Clifford 150 years ago. 

Assume we go back to 1880s, when people were kind of deciding which way to go that on the one hand, you had some Geometric Algebra and on the other hand, you had some vector algebra, and a little bit of matrices as well. 

There are many good arguments that we would have been better off if we had tipped the scales and ended up teaching everybody more Geometric Algebra rather than Linear Algebra. I have never had a conversation that satisfied me with a person who disagreed on that. What sadly happened was that Clifford, promoting Geometric Algebra, died too soon. The world just forgot about it.  

It is perhaps too easy to say that kind of theoretical thing. We live in the world where Benjamin Franklin decided that electrons were negative instead of positive, and where Britain decided to drive on the left-hand side of the road. Changing things is way harder than making the right decision from the start.  We don’t have a time machine. It is something you cannot stop yourself from thinking about: asking the ‘what if’ questions. I quite like today’s very fascinating challenge which lies in bringing Geometric Algebra to everybody knowing Linear Algebra.  And perhaps if Clifford had lived longer, I would be sitting here telling you I am fascinated to bring matrices to everybody knowing Geometric Algebra! 

Fair enough. You are also an AI researcher and on your GitHub you mention Geometric Algebra has a huge potential to improve AI, graphics and robotics.  So, I wonder how Geometric Algebra could be able to improve even AI? 

I am only allowed to point you to the video I made using Geometric Algebra to explore the phenomenon called ‘information geometry’, which is quite well-studied as an AI technique. 

I know you must have faced this question before: what exactly are the elements e+ and e- within Conformal Geometric Algebra? 

The element e₊ is easy because this is just the unit sphere around the origin! Very easy to remember: there is no reason not to remember that (winks). 

The element e₋ is the more complicated one. 99% of the time when you see it, it’s doing a specific thing: either growing spheres or shrinking them. In that respect, it is like ketchup or mustard because you see it with other things, but you never see it on its own.  

Example: start with e₊ (the unit sphere) and add 0.5e₋. That gets you a slightly bigger sphere.  There is not more to it, because e₊ + 0.5e₋ is a sphere slightly bigger than the unit sphere. How about if we subtract, to make e₊ – 0.5 e₋? No big surprise again: that makes a sphere which is slightly smaller than e₊.   We cannot call this rocket science. 

That’s the 99%, where e₋ just makes spheres bigger or smaller. But people ask about that 1% of the time; for example, what is “pure” e₋, that is, e₋ on its own, added to nothing else? Or e₋ + 0.1e₁? What do those do? 

For that question, we look at the CGA dual of e₋. That’s the element e₁₂₃₊. It turns out that if you look at an element and its CGA dual, they do essentially the same thing. 

So what does e₁₂₃₊ do? Let us break it down: e₁₂₃₊ = e₁ e₂ e₃ e₊. Note e₁ is the reflection in the z-plane. Note e₂ is the reflection in the x-plane. And e₃ is the reflection in the y-plane. And then e₊ as an action, is the reflection in the unit sphere. Do all of those and look at the result which is so funky! The total transformation kind of swirls around, which is very weird. But you’ll figure it out if you think about it long enough. And by studying and experiencing e₁₂₃₊ you may eventually understand e₋. 

Figure 1: Combinations of e+ and e- (courtesy of Hamish Todd) 

When you talked about the Projective Geometric Algebra (PGA) versus the Conformal Geometric Algebra (CGA), you then claimed  CGA being the better option, but I forgot for why (to be honest)? 

Well, they are each better for different tasks. If you want to make a game and you do not care that much about animation or want your game finished somewhat quickly (like only having a few months for it), you use PGA in my opinion. 

Unless it is a video game that involves complicated geometry.  I mean video games like ‘Hyper Rogue’ or ‘Ratchet & Clank’ in which scenes take place on the surface of a sphere. Then CGA is the better pick.   

Anything that PGA can do, CGA can also do. So you might use that as an argument to claim that CGA is always better.  If you also have the time to invest in implementing CGA.  

CGA is truly complicated and a lot of its articulation is not really that useful. Whereas almost the entirety of PGA is very, very useful.  PGA also operates slightly faster than CGA.  

Figure 2: Difference between the PGA and the CGA infinities (courtesy of Hamish Todd) 

Would not CGA be the better pick because then you would not need the duality in PGA any longer? 

Listen, PGA duality does get the job done.  It does two things.  

First, it lets you find distances!  Imagine you have a translation or a screw motion, then PGA duality will be very helpful for finding out what distance they take you.   

Secondly, imagine having two points, then PGA duality will allow you to get the line connecting those two points.  In case of three points, then it would help you in returning the plane containing those three points. 

Despite these duality advantages, different people have different ways of working.  And either way works, no matter which one you choose: either CGA or either PGA-with-duality.  

CGA duality very specifically implements a geometry that, to me, is highly elegant. Comparing  that to PGA, then PGA does not have any elegant geometry uniquely associated to it. I say “uniquely” very carefully. People can find and have found ways to attach elegant geometry to it. I once made a video game about one of these geometries, called ‘Dual Tetris’. But ‘Dual Tetris’ was one of the worst games I have ever played! 

Leo Dorst, Steven De Keninck, Jon Selig and even Eric Lengyel all choose to relate PGA duality to what I and most other geometers would call ‘elliptic geometry’.  Elliptic geometry is very beautiful, it is geometry on the surface of a sphere. Spheres are great, so why do I still say PGA has no elegant geometry associated to it?  It turns out that PGA duality is at the same time equally related to ‘hyperbolic geometry’.  Hyperbolic geometry is the geometry on a saddle-like surface. To be formal for one second, the elliptic approach says, “to get dual(X), pretend that e0 squares to 1 and multiply X by e 1230 ”.  While the hyperbolic approach says, “to get dual(X), pretend that e0 squares to -1 and multiply X by e 1230”. 

Figure 3: Hyperbolic versus Elliptic duality in PGA (courtesy of Eric Lengyel) 

So which do you choose? PGA duality from a sphere? Or a PGA duality from a saddle? It turns out that it makes no difference which one you choose! You get the same results anyhow. I would say there is no criterion for which choice would be the best. In my opinion it is far from mathematical to say anything like “PGA duality comes from elliptic geometry”, even when it draws a nice picture. 

We have indeed discussed quite some aspects of CGA at length, we deeply thank you and Howest is looking forward to seeing you again at GAME2029. 

Interview conducted by Leendert Desmet

Een reactie achterlaten

Je e-mailadres zal niet getoond worden. Vereiste velden zijn gemarkeerd met *