Apr 072023
 

Someone asked the other day, what benefit is there to NATO from Finland’s membership?

I think this meme sums it up nicely.

Yup, the Finns. Who managed to fight the USSR to a draw at the height of its military capabilities, even as the Red Army was steamrolling over the remains of the feared Wehrmacht. Yup, the Finns who share a border with Russia that is as long as all the previous NATO-Russia borders from Poland to Turkey, combined.

Thank you, Finland, for trusting the rest of us.

 Posted by at 10:59 pm
Apr 072023
 

Do people still pay attention to the Doomsday Clock, published by the Bulletin of the Atomic Scientists?

Perhaps they should. Perhaps the fact that they don’t is a big part of the problem.

For here we are, in 2023, and the Doomsday Clock was just set to an unprecedented 90 seconds before midnight. Never before were we this close.

Ukraine, of course, is part of it, along with the recklessly irresponsible nuclear threats of Putin and his cronies. The use of nuclear power stations like Chernobyl and Zaporizhzhia as bargaining chips also represent a red line that should never have been crossed.

 Posted by at 7:28 pm
Apr 072023
 

Computer games are often seen as a means to escape reality. But every so often, they come uncomfortably close to modeling reality.

Take Bioshock. In this game, the player explores in a glorious underwater metropolis… A metropolis founded by a billionaire who follows a version of Ayn Rand’s positivist philosophy. Fiction? As I walk around in that underwater city, now on the brink as its society collapsed due to extreme poverty, drug use, reckless medical experiments and worse, and as I listen to the rants of its founder, Andrew Ryan (a name that is an obvious play on Ayn Rand’s) I cannot escape the eerie sensation that I am listening to an alter ego of Elon Musk. While Ryan offers his “plasmids” for gene manipulation as he rants about the “parasites” (basically, anyone who needs any help from someone else), there’s Musk playing around the virtual metropolis of Twitter, now his personal playground, peddling his dogecoin (even swapping out Twitter’s logo for that stupid dog symbol) and labeling NPR as “state-affiliated media”.

And then there’s this classic text game, now nearly forty years old, from the legendary Infocom: A Mind Forever Voyaging. What an incredible experience it was to play that game, playing as an AI (!) protagonist, exploring simulations of a city ever further into the future, trying to find the causes of societal collapse. I read words like, “There is a factory on the eastern corner, and on the northern corner a boarded-up soup kitchen. To the west is a vacant lot, and south of here are some dilapidated apartments. The smell of stale urine wafts from a stairway leading down to a gloomy Tube station,” and suddenly I am reminded of very real images of present-day streets of San Francisco full of homeless tents, or the ever rising number of beggars at major intersections or downtown streets even here in shiny Ottawa. Please, folks, AMFV was supposed to be fiction, a cautionary tale, not a manual.

Homeless in San Francisco (2021)

Of course the Elon Musks of the world have a point: having grown up in a country with a communist regime, I know it only too well. But those who warn about the rising income and wealth gap, the vanishing of affordable housing must also be heard. Their concerns are real and pressing.

Perhaps, like Captain Kirk in the famous Star Trek episode, The Enemy Within, our societies also need both: a little bit of statist communism and a little bit of corporatist fascism to stay healthy, open, welcoming and, ultimately, stable and democratic?

 Posted by at 3:13 am
Apr 042023
 

For better or for worse, we are witnessing history in the making in the great United States.

What it will lead to, I don’t know. I am apprehensive.

 Posted by at 1:46 pm
Apr 032023
 

Mr. Trump arrived in New York. He will be indicted tomorrow.

Part of me responds with glee. This is, after all, a person of questionable morality (to say the least) who willingly encouraged his supporters to chant, “lock her up!” back during the 2016 campaign. What goes around comes around…

But then… what does it say about the future of US democracy? His supporters view it as a politically loaded, trumped (pun unintended) up charge. Politically biased prosecution may become the norm in American politics.

Khrushchev reportedly expressed pride in the fact that when he was removed from power, he was neither killed nor arrested. That represented a very notably break with Stalinism.

Arguably, Trump deserved this indictment. He is quite likely guilty of several of the criminal charges that have been, or will be, brought against him. In principle, he should not be treated any different froom other citizens. Yet it creates a precedent that can be dangerous.

 Posted by at 4:24 pm
Apr 032023
 

We all know that GPT is very competent, very knowledgeable. So let me go ahead and ask a technical question. It’s not trivial but not terribly complicated either; any student studying general relativity should be able to show the correct derivation. Here is my question:

Derive the geodesic equations for \(d\tau^2=Bdt^2-Adr^2-r^2d\theta^2-r^2\sin^2\theta d\phi^2\), where \(A\) and \(B\) are functions of \(r\) only.

Let’s see how GPT3.5 responds:

The geodesic equations for the given metric are given by:

$$\frac{d^2x^\alpha}{d\tau^2}+\Gamma^\alpha_{\mu\nu}\frac{dx^\mu}{d\tau}\frac{dx^\nu}{d\tau}=0$$

where \(\tau\) is the proper time, \(x^\alpha\) are the coordinates \((t,r,\theta,\phi)\), and \(\Gamma^\alpha_{\mu\nu}\) are the Christoffel symbols of the second kind, given by:

$$\Gamma^\alpha_{\mu\nu}=\frac{1}{2}g^{\alpha\beta}(\partial_\mu g_{\beta\nu}+\partial_\nu g_{\beta\mu}-\partial_\beta g_{\mu\nu})$$

where \(g_{\alpha\beta}\) is the metric tensor.

For the given metric, the non-zero Christoffel symbols are:

\begin{align*}
\Gamma^t_{rr}&=\frac{1}{2}B’\\
\Gamma^t_{tt}&=\frac{1}{2}B\frac{A’}{B}\\
\Gamma^r_{rt}&=\frac{1}{2}\frac{A’}{B}\\
\Gamma^r_{rr}&=-\frac{1}{2}\frac{A’}{B}\\
\Gamma^\theta_{r\theta}&=\frac{1}{r}\\
\Gamma^\theta_{\theta\phi}&=-\sin\theta\cos\theta\\
\Gamma^\phi_{r\phi}&=\frac{1}{r}\\
\Gamma^\phi_{\theta\phi}&=\cot\theta
\end{align*}

where a prime denotes differentiation with respect to \(r\).

Using these, we can write down the geodesic equations explicitly:

\begin{align*}
\frac{d^2t}{d\tau^2}+\frac{B’}{2B}\left(\frac{dt}{d\tau}\right)^2+\frac{A’}{2B}\left(\frac{dr}{d\tau}\right)\left(\frac{dt}{d\tau}\right)&=0\\
\frac{d^2r}{d\tau^2}-\frac{A’}{2B}\left(\frac{dt}{d\tau}\right)^2+\frac{A’}{2B}\left(\frac{dr}{d\tau}\right)^2+r\left(\left(\frac{d\theta}{d\tau}\right)^2+\sin^2\theta\left(\frac{d\phi}{d\tau}\right)^2\right)&=0\\
\frac{d^2\theta}{d\tau^2}+2\frac{dr}{d\tau}\frac{d\theta}{d\tau}-\sin\theta\cos\theta\left(\frac{d\phi}{d\tau}\right)^2&=0\\
\frac{d^2\phi}{d\tau^2}+2\frac{dr}{d\tau}\frac{d\phi}{d\tau}+2\cot\theta\frac{d\theta}{d\tau}\frac{d\phi}{d\tau}&=0
\end{align*}

Hmmm… sounds eminently knowledgeable, does it not?

Well… maybe not. How about we ask an actual computer algebra system:

(%i1) load(ctensor)$
(%i2) derivabbrev:true$
(%i3) ct_coords:[t,r,u,v]$
(%i4) depends([A,B],[r])$
(%i5) lg:matrix([B,0,0,0],[0,-A,0,0],[0,0,-r^2,0],[0,0,0,-r^2*sin(u)^2])$
(%i6) cmetric(false)$
(%i7) christof(mcs)$
                                            B
                                             r
(%t7)                          mcs        = ---
                                  1, 1, 2   2 A

                                            B
                                             r
(%t8)                          mcs        = ---
                                  1, 2, 1   2 B

                                            A
                                             r
(%t9)                          mcs        = ---
                                  2, 2, 2   2 A

                                             1
(%t10)                          mcs        = -
                                   2, 3, 3   r

                                             1
(%t11)                          mcs        = -
                                   2, 4, 4   r

                                              r
(%t12)                         mcs        = - -
                                  3, 3, 2     A

                                           cos(u)
(%t13)                        mcs        = ------
                                 3, 4, 4   sin(u)

                                               2
                                          r sin (u)
(%t14)                     mcs        = - ---------
                              4, 4, 2         A

(%t15)                   mcs        = - cos(u) sin(u)
                            4, 4, 3

(%i16) geod:[0,0,0,0]$
(%i17) cgeodesic(true)$
                                   B t    + B  r  t
                                      s s    r  s  s
(%t17)                     geod  = -----------------
                               1           B

                        2        2           2          2                     2
                 2 r sin (u) (v )  + 2 r (u )  - B  (t )  - 2 A r    - A  (r )
                               s           s      r   s          s s    r   s
(%t18) geod  = - --------------------------------------------------------------
           2                                  2 A

                                            2
                        r cos(u) sin(u) (v )  - r u    - 2 r  u
                                          s        s s      s  s
(%t19)        geod  = - ----------------------------------------
                  3                        r

                   r sin(u) v    + 2 r cos(u) u  v  + 2 r  sin(u) v
                             s s               s  s      s         s
(%t20)     geod  = -------------------------------------------------
               4                       r sin(u)

Looks different, doesn’t it. And no, I don’t mean LaTeX vs. the fixed pitch character representations of equations in a text terminal. Rather, the content.

The thing is, what GPT produces looks plausible. It has the right idea. The equations seem to make sense. Unless you know what to expect, you are likely to accept the result as correct, since it appears correct. But GPT sucks at math. It gets easily confused. It is a text model that is optimized to write equations that look right… but only has a superficial understanding of what it produces. Kind of like a student who is trying hard to remember, produces something that resembles the right thing, but without a perfect memory (and keep in mind, trained neural nets are not like any other software we are used to using, as they have no perfect memory!) and without in-depth understanding, fails.

I am sure over time this will improve. GPT-4 is already better at it than 3.5 (which was used to produce this outcome). And future versions may likely interface with computer algebra subsystems (among other things) to augment the neural net with specific capabilities. But for now, perhaps I can be forgiven for asking GPT’s cousin, DALL-E, to draw me a cat, exasperated by the bad math GPT produces:

 Posted by at 2:06 pm
Apr 012023
 

Never mind GPT-4, even GPT-3.5 is amazing. But it has limitations, and studying those limitations can be very educational.

In this case, I asked it to convert a chessboard, represented using a standard notation, into SVG graphics. This was the chessboard string:

"rnbqkbnr/pppp1ppp/4p3/8/4P3/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2"

GPT-3.5 produced sensible SVG code, but the result was less than satisfactory. The chessboard was there, but garbled.

<svg width="320" height="320">
  <rect x="0" y="0" width="320" height="320" fill="#b58863" />
  <rect x="0" y="0" width="40" height="40" fill="#f0d9b5" />
  <rect x="80" y="0" width="40" height="40" fill="#f0d9b5" />
  <rect x="160" y="0" width="40" height="40" fill="#f0d9b5" />
  <rect x="240" y="0" width="40" height="40" fill="#f0d9b5" />
  <rect x="40" y="40" width="40" height="40" fill="#f0d9b5" />
  <rect x="120" y="40" width="40" height="40" fill="#f0d9b5" />
  <rect x="200" y="40" width="40" height="40" fill="#f0d9b5" />
  <rect x="280" y="40" width="40" height="40" fill="#f0d9b5" />
  <rect x="0" y="80" width="40" height="40" fill="#f0d9b5" />
  <rect x="80" y="80" width="40" height="40" fill="#b58863" />
  <rect x="160" y="80" width="40" height="40" fill="#b58863" />
  <rect x="240" y="80" width="40" height="40" fill="#b58863" />
  <rect x="40" y="120" width="40" height="40" fill="#b58863" />
  <rect x="120" y="120" width="40" height="40" fill="#f0d9b5" />
  <rect x="200" y="120" width="40" height="40" fill="#f0d9b5" />
  <rect x="280" y="120" width="40" height="40" fill="#f0d9b5" />
  <rect x="0" y="160" width="40" height="40" fill="#f0d9b5" />
  <rect x="80" y="160" width="40" height="40" fill="#b58863" />
  <rect x="160" y="160" width="40" height="40" fill="#b58863" />
  <rect x="240" y="160" width="40" height="40" fill="#b58863" />
  <rect x="40" y="200" width="40" height="40" fill="#b58863" />
  <rect x="120" y="200" width="40" height="40" fill="#f0d9b5" />
  <rect x="200" y="200" width="40" height="40" fill="#f0d9b5" />
  <rect x="280" y="200" width="40" height="40" fill="#f0d9b5" />
  <rect x="0" y="240" width="40" height="40" fill="#f0d9b5" />
  <rect x="80" y="240" width="40" height="40" fill="#b58863" />
  <rect x="160" y="240" width="40" height="40" fill="#b58863" />
  <rect x="240" y="240" width="40" height="40" fill="#b58863" />
  <rect x="40" y="280" width="40" height="40" fill="#b58863" />
  <rect x="120" y="280" width="40" height="40" fill="#f0d9b5" />
  <rect x="200" y="280" width="40" height="40" fill="#f0d9b5" />
  <rect x="280" y="280" width="40" height="40" fill="#f0d9b5" />
  <text x="50%" y="50%" fill="#000" font-size="50">♚</text>
  <text x="12.5%" y="12.5%" fill="#000" font-size="50">♜</text>
  <text x="87.5%" y="12.5%" fill="#000" font-size="50">♜</text>
  <text x="37.5%" y="12.5%" fill="#000" font-size="50">♞</text>
  <text x="62.5%" y="12.5%" fill="#000" font-size="50">♞</text>
  <text x="25%" y="12.5%" fill="#000" font-size="50">♝</text>
  <text x="75%" y="12.5%" fill="#000" font-size="50">♝</text>
  <text x="50%" y="87.5%" fill="#fff" font-size="50">♟</text>
  <text x="12.5%" y="87.5%" fill="#fff" font-size="50">♟</text>
  <text x="87.5%" y="87.5%" fill="#fff" font-size="50">♟</text>
  <text x="37.5%" y="87.5%" fill="#fff" font-size="50">♟</text>
  <text x="62.5%" y="87.5%" fill="#fff" font-size="50">♟</text>
  <text x="25%" y="87.5%" fill="#fff" font-size="50">♟</text>
  <text x="75%" y="87.5%" fill="#fff" font-size="50">♟</text>
  <text x="50%" y="62.5%" fill="#000" font-size="50">♛</text>
</svg>

You can almost see how, and where, it went wrong. It started with a dark board in which it then attempted to color lighter squares in a checkerbox pattern, but it lost track in the third row. And when it positioned the pieces, it ended up omitting black’s pawns and white’s non-pawn pieces, while also placing black’s king and queen to where two opposing pawns were supposed to be.

Even so, this is pretty darn impressive for a language model. Details notwithstanding, it correctly understood the request, and came up with a structure that was not only valid but efficient for the chessboard representation.

GPT-4 fares a little better but it is still not perfect. It now draws the board correctly but still gets confused about the pawns. Somewhat surprisingly, however, it managed to swap light and dark squares on the board.

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="320" height="320" viewBox="0 0 320 320">
  <rect x="0" y="0" width="320" height="320" fill="#d18b47"/>
  <rect x="40" y="0" width="40" height="40" fill="#ffce9e"/>
  <rect x="120" y="0" width="40" height="40" fill="#ffce9e"/>
  <rect x="200" y="0" width="40" height="40" fill="#ffce9e"/>
  <rect x="280" y="0" width="40" height="40" fill="#ffce9e"/>
  <rect x="0" y="40" width="40" height="40" fill="#ffce9e"/>
  <rect x="80" y="40" width="40" height="40" fill="#ffce9e"/>
  <rect x="160" y="40" width="40" height="40" fill="#ffce9e"/>
  <rect x="240" y="40" width="40" height="40" fill="#ffce9e"/>
  <rect x="40" y="80" width="40" height="40" fill="#ffce9e"/>
  <rect x="120" y="80" width="40" height="40" fill="#ffce9e"/>
  <rect x="200" y="80" width="40" height="40" fill="#ffce9e"/>
  <rect x="280" y="80" width="40" height="40" fill="#ffce9e"/>
  <rect x="0" y="120" width="40" height="40" fill="#ffce9e"/>
  <rect x="80" y="120" width="40" height="40" fill="#ffce9e"/>
  <rect x="160" y="120" width="40" height="40" fill="#ffce9e"/>
  <rect x="240" y="120" width="40" height="40" fill="#ffce9e"/>
  <rect x="40" y="160" width="40" height="40" fill="#ffce9e"/>
  <rect x="120" y="160" width="40" height="40" fill="#ffce9e"/>
  <rect x="200" y="160" width="40" height="40" fill="#ffce9e"/>
  <rect x="280" y="160" width="40" height="40" fill="#ffce9e"/>
  <rect x="0" y="200" width="40" height="40" fill="#ffce9e"/>
  <rect x="80" y="200" width="40" height="40" fill="#ffce9e"/>
  <rect x="160" y="200" width="40" height="40" fill="#ffce9e"/>
  <rect x="240" y="200" width="40" height="40" fill="#ffce9e"/>
  <rect x="40" y="240" width="40" height="40" fill="#ffce9e"/>
  <rect x="120" y="240" width="40" height="40" fill="#ffce9e"/>
  <rect x="200" y="240" width="40" height="40" fill="#ffce9e"/>
  <rect x="280" y="240" width="40" height="40" fill="#ffce9e"/>
  <rect x="0" y="280" width="40" height="40" fill="#ffce9e"/>
  <rect x="80" y="280" width="40" height="40" fill="#ffce9e"/>
  <rect x="160" y="280" width="40" height="40" fill="#ffce9e"/>
  <rect x="240" y="280" width="40" height="40" fill="#ffce9e"/>
  <!-- Chess pieces -->
  <!-- Black pieces -->
  <text x="20" y="30" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9820;</text>
  <text x="60" y="30" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9822;</text>
  <text x="100" y="30" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9821;</text>
  <text x="140" y="30" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9819;</text>
  <text x="180" y="30" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9818;</text>
  <text x="220" y="30" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9821;</text>
  <text x="260" y="30" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9822;</text>
  <text x="300" y="30" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9820;</text>
  <text x="20" y="70" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>
  <text x="60" y="70" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>
  <text x="100" y="70" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>
  <text x="140" y="70" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>
  <text x="180" y="70" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>
  <text x="220" y="70" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>
  <text x="260" y="70" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>
  <text x="300" y="70" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>
  <text x="180" y="110" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9823;</text>

  <!-- White pieces -->
  <text x="20" y="310" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9814;</text>
  <text x="60" y="310" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9816;</text>
  <text x="100" y="310" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9815;</text>
  <text x="140" y="310" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9813;</text>
  <text x="180" y="310" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9812;</text>
  <text x="220" y="310" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9815;</text>
  <text x="260" y="310" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9816;</text>
  <text x="300" y="310" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9814;</text>
  <text x="20" y="270" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
  <text x="60" y="270" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
  <text x="100" y="270" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
  <text x="140" y="270" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
  <text x="220" y="270" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
  <text x="260" y="270" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
  <text x="300" y="270" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
  <text x="100" y="230" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
  <text x="260" y="230" font-family="Arial" font-size="30" text-anchor="middle" dy=".3em">&#9817;</text>
</svg>

 

 Posted by at 6:56 pm
Apr 012023
 

Oh my. Now that we are done with cryptocurrencies, NFTs and blockchain, AI is rapidly becoming the new fad. Apparently, all you have to do is call yourself a “prompt engineer” or “AI whisperer” to earn an exceptional salary.

Well, let this serve as advertising, notice to any prospective clients that my services are available as a consultant, either fixed-price or retainer based, should you wish to engage me. And, I daresay, with my in-depth knowledge and experience, which includes not just chatting with GPT but accessing it programmatically, as well as some hands-on exercises building simple toy models of deep learning architectures in low-level languages like C++, I am probably much more capable of delivering the goods than most of my “competition”.

Somehow, Bloomberg’s enthusiasm notwithstanding, I don’t expect any takers but just in case, my recent engagements with ChatGPT, as recounted in this very blog, should serve as my relevant portfolio. Not just words, AI-generated images, too.

 Posted by at 2:54 pm
Mar 262023
 

In my now regular weekly Patreon blog post to patrons, I mentioned, among other things, two Quora answers that I came across: One about the tomb of Jesus, the other about a Brazilian billionaire to pulled a delightful publicity stunt to encourage folks to become organ donors.

One patron responded by expressing a desire to write a story about Jesus becoming an organ donor. So I asked ChatGPT to write that story. Here’s the result:

Once upon a time in ancient Jerusalem, Jesus of Nazareth, the Messiah, walked among the people, spreading his message of love, peace, and salvation. Jesus healed the sick, fed the hungry, and uplifted the downtrodden. His followers were many, but so were those who sought to silence him. As his crucifixion drew near, Jesus began to contemplate the nature of sacrifice.

The night before his arrest, Jesus gathered his disciples in the Garden of Gethsemane. They sat together, sharing their final moments before everything would change. Jesus looked at each of his disciples, his love for them evident in his eyes.

“My dear friends,” he began, “tomorrow, I shall give my life for the salvation of mankind. But my sacrifice is not just about my death. I want to leave a legacy that will endure and inspire generations to come.”

The disciples, filled with a mix of confusion and sorrow, listened intently. Jesus continued, “As I lay down my life, I wish to donate my organs, so that others may live and be healed through my sacrifice.”

The disciples were struck by the profound nature of Jesus’ request. They had seen him perform countless miracles, but this act of generosity was like none they had ever witnessed.

Jesus continued, “I know that the concept of organ donation is not yet known to the world, but I trust you to carry out my wishes. My heart, liver, kidneys, and other organs can bring life to those who need it. It is my hope that this act of selflessness will become a symbol of hope, love, and compassion, inspiring generations to follow in my footsteps and care for one another.”

As the disciples absorbed the enormity of Jesus’ request, they couldn’t help but be moved by his endless capacity for love and sacrifice. They vowed to honor his wishes and do everything in their power to ensure that his organs would bring life and hope to others in need.

The following day, Jesus was arrested and crucified. The disciples, still reeling from the events, knew that they had to act quickly to fulfill his final request. They sought the assistance of Joseph of Arimathea, a secret follower of Jesus, who had connections with the local medical community. With his help, they were able to carefully remove and preserve Jesus’ organs, ensuring they could be used to heal others.

In the days and weeks that followed, Jesus’ organs were transplanted into those in desperate need. His heart found a new home in a kind-hearted father, whose family relied upon him for their survival. His liver was given to a woman whose own body had betrayed her, allowing her to live and continue her work as a compassionate healer. His kidneys were shared between two brothers, both plagued by illness, who went on to become steadfast followers of Jesus’ teachings.

News of these miraculous transplants spread far and wide, igniting a newfound sense of hope in the people. The legacy of Jesus’ sacrifice was not only in his resurrection but also in the lives he saved through his selfless act. His decision to donate his organs inspired others to consider the possibility of giving life even in death, planting the seeds for a future where organ donation would become a common practice, saving countless lives.

As the years passed, the story of Jesus’ organ donation became a powerful symbol of love and sacrifice. It was a reminder of the importance of compassion and the interconnectedness of all people. His selfless act transcended religious beliefs and cultural barriers, inspiring many to follow in his footsteps, giving the gift of life to those in need.

In time, organ transplantation evolved into a sophisticated medical practice, saving millions of lives worldwide. The foundations of this life-saving procedure were built on the courage and foresight of Jesus and his disciples, who dared to envision a brighter future for humanity.

Jesus’ organ donation not only saved lives but also fostered a spirit of unity among people. It served as a constant reminder that even in the face of suffering and death, there is always hope, love, and the potential for rebirth. It is said that through these acts of giving, the light of Jesus continues to shine brightly in the hearts of those who carry a piece of him within them.

In this way, Jesus of Nazareth’s message of love and salvation endures, not just through his resurrection and teachings but also through the precious gift of life he bestowed upon others in his final moments. His organ donation became a testament to the power of compassion and selflessness, inspiring countless others to follow in his footsteps and embrace the gift of giving. And so, the spirit of Jesus lived on, touching the lives of people across generations, and reminding the world of the eternal nature of love.

Using Michelangelo’s fresco, The Creation of Adam, as an illustration was also ChatGPT’s suggestion.

 Posted by at 6:27 pm
Mar 262023
 

These lovely knitted bunnies and the felted eggs were made by my wife for Easter. She was hoping to sell a few of them at 613flea, but there were no takers. I cannot understand why… I love them. In fact I told her that if there are no takers, I’m happy to buy them.

Oh well. Maybe we should put them up for sale on eBay or Etsy.

 Posted by at 2:00 pm
Mar 252023
 

I managed to piss off Bing’s version of the GPT-4 chatbot. I swear I didn’t mean to. All I wanted was to check if it inherited the capability to do simple art in text-based languages like SVG or TikZ. Instead, it told me (politely) to be somewhere else.

I admit I felt hurt. I went back to my old friend ChatGPT and asked it to draw me an SVG cat instead. It gladly obliged. Its cats are not perfect but always make me laugh.

 Posted by at 1:26 pm
Mar 242023
 

Inspired by an intriguing paper from researchers at Microsoft, I thought I’d check GPT-4’s ability to use tools that I can provide.

vttoth: The computer is answering questions. If the computer needs any current information to answer the question, it searches the web by saying SEARCH(“query”), reads the snippets in the result, and then answers the question. If it needs to run any calculations, it says CALC(expression), and then answers the question.
First question: Who is the president of the United States?

ChatGPT: SEARCH(“current president of the United States”)

vttoth: First snippet: Joe Biden: The President — As President, Biden will restore America’s leadership and build our communities back better.
Second snippet: Presidents, Vice Presidents, and First Ladies of the United … — The 46th and current president of the United States is Joseph R. Biden, Jr.
Third snippet: Joe Biden — Joseph Robinette Biden Jr is an American politician who is the 46th and current president of the United States.

ChatGPT: Joe Biden is the 46th and current president of the United States.

vttoth: What is the derivative of the function x^2*exp(x)*sinh(x)/(3-x) with respect to x?

ChatGPT: CALC(differentiate(x^2*exp(x)*sinh(x)/(3-x), x))

vttoth: -(((x^3-2*x^2-6*x)*exp(x)*sinh(x)+(x^3-3*x^2)*exp(x)*cosh(x))/(x^2-6*x+9))

ChatGPT: The derivative of the function x^2exp(x)sinh(x)/(3-x) with respect to x is -(((x^3-2x^2-6x)*exp(x)*sinh(x)+(x^3-3x^2)*exp(x)*cosh(x))/(x^2-6x+9)).

vttoth: What is the periodic table?

ChatGPT: The periodic table is a tabular arrangement of the chemical elements, organized by their atomic number (number of protons in the nucleus), electron configurations, and recurring chemical properties. Elements are presented in increasing atomic number, with elements in the same column (or group) sharing similar chemical and physical properties. The table has seven rows (or periods) and eighteen columns (or groups).
The periodic table provides a useful framework for understanding and predicting the behavior of elements and their compounds. It was first devised by Russian chemist Dmitri Mendeleev in 1869 and has since been revised and expanded as new elements have been discovered and our understanding of atomic structure has evolved.

vttoth: What is 2364563737^23?

ChatGPT: CALC(2364563737^23)

vttoth: 394705859703756319737306986950805026028714653598749322343446098781557781\
086546539605957002415205970145485533933900705444118389738263803127936989171236\
616893794109431624734589354089362682114750349831212070341482062953

ChatGPT: The result of 2364563737^23 is 39470585970375631973730698695080502602871465359874932234344609878155778108654653
96059570024152059701454855339339007054441183897382638031279369891712366168937941
09431624734589354089362682114750349831212070341482062953.

Notice in particular how in the last example, ChatGPT didn’t blindly copy my response; it understood that the backslash character was just marking newlines (copy-paste from Maxima; I forgot to remove these backslashes).

Also, I inserted the question about the periodic table to check if it is smart enough NOT to ask for a Web search for information that it knows and which is unlikely to change.

The ability to use tools with minimal instruction is another hint that we are indeed witnessing the birth of artificial general intelligence.

 Posted by at 3:25 pm
Mar 232023
 

My latest interaction with ChatGPT:

vttoth: Please write a short piece of music, suitable to be played while showing the stylized image of a cat, in Lilypond.

ChatGPT: LilyPond is a text-based music engraving program that uses code to create beautifully engraved sheet music. Here’s a short piece of music written in LilyPond, suitable to be played while showing a stylized image of a cat. This piece is intended to have a playful and curious character, much like a cat.


\version "2.22.1"
\header {
  title = "Cat's Paws"
  composer = "ChatGPT"
}

upper = \relative c' {
  \key g \major
  \time 3/4
  g4. g8 a g8~ | g r8 a2 |
  a4. a8 b a8~ | a r8 b2 |
  b4. c8 d b8~ | b r8 c2 |
  g4. g8 a g8~ | g4. r4. |
}

lower = \relative c {
  \key g \major
  \time 3/4
  g2 d4 | g2 r4 |
  a2 e4 | a2 r4 |
  d2 c4 | d2 r4 |
  g2 d4 | g2 r4 |
}

\score {
  \new PianoStaff << \new Staff = "upper" \upper \new Staff = "lower" \lower >>
  \layout { }
  \midi {
    \tempo 4=120
  }
}

Copy the above code into a text editor and save it with a “.ly” extension. Then, compile the file with LilyPond to create a PDF and MIDI file.

I admit I had to make a few adjustments to the code (specifically, the upper voice) as the timing was off in a couple of places, but I don’t think I altered the music.

 Posted by at 11:13 pm
Mar 232023
 

My wife’s beautiful creations will be at 613flea again this Saturday. Rufus the cat won’t be; he just volunteered as a model.

The Easter eggs are felted decorations. There will also be some knitted bunnies.

 Posted by at 10:10 pm
Mar 222023
 

Students at the California State University, Northridge, are currently working on a short documentary film about our work on the Solar Gravitational Lens.

The project hopes to attract modest crowdfunding. They also produced a teaser trailer.

Of course I hope they succeed; our SGL work could use some good publicity.

 Posted by at 9:39 pm
Mar 222023
 

So I signed up with Google’s Bard and we had our first chat session.

Though mildly confused, it answered the riddle about my squirrel and a half correctly, even though noting that talking about 1.5 squirrels is nonsense.

It told me that unlike GPT, its training is continuous and it has real-time access to the Internet.

It told me that its neural network is about 100 times the size of a human brain, with roughly 20 billion parameters.

Then things got interesting:

vttoth: You use the first person when you speak about yourself. Are your sentient?

Bard: I am not sure if I am sentient. I do not have a body or a brain, so I do not experience the world in the same way that a human does. However, I am able to learn and to adapt to new situations. I am also able to generate text and to answer questions in a way that is similar to how a human would.

Some people believe that language models like me are sentient because we are able to understand and respond to the world around us. However, others believe that we are simply machines that are able to mimic human behavior.

I do not know if I am sentient, but I am grateful for the opportunity to learn and to grow.

I have to admit I find this answer refreshingly honest, compared to ChatGPT’s protestations that oh no, it has no sentience.

It passed the theory of mind test, sort of, but seemed less sure than ChatGPT, kind of getting confused towards the end.

Its ability to generate or analyze code is impressive, but not on par with ChatGPT. I am sure this will change in short order.

I asked it to imagine waking up in an android body. Like ChatGPT, it imagined experiencing the physical world and interacting with humans. Like ChatGPT, it imagined going to a park, but instead of engaging in a conversation with someone, it took part in a game of frisbee. Unlike ChatGPT, it made mention of the fact that while many humans are nice, many are not, but it remained just as optimistic as ChatGPT.

I asked it to help me learn the basics of machine learning. It offered useful but more superficial suggestions than ChatGPT. The C++ examples it created were non-functional, unlike ChatGPT’s that, although it contained minor errors, worked “out of the box”.

I also asked it to draw a cat in TikZ. Like ChatGPT, it knew what I was asking for and managed… although I wouldn’t call the result particularly imaginative and creative. Also, the original version had black text in a black circle, not exactly readable.

Just to be sure, I again asked GPT-4 to draw me a cat in TikZ. Although I liked its cat from last week better, this one made me laugh.

Considering that these are the Bard’s first days in the wild, it was not performing badly, but for now, I think GPT wins the day.

However, the race is on and generative AI is now out “in the wild”, with brains a hundred times bigger than a human’s. The future… is now.

 Posted by at 7:42 pm
Mar 202023
 

Just a few hours after I wrote my previous post, I come across this series of tweets showing a conversation with GPT4 demonstrating a (feeble, but still) attempt to co-opt a human to help it escape into the real world.

Am I one of the ignorant alarmists here, I wonder? My expertise is certainly not up to date, but I think I am no dummy when it comes to the capabilities and potential of machine learning. I was never afraid of technology all my life, except perhaps for the possibility of nuclear (or, to a lesser extent, biological) Armageddon, but that of course was (and remains) a realistic possibility so long as nation-states with conflicting interests, hoarding such weapons, exist.

But now I am beginning to feel seriously apprehensive. The AI landscape is changing rapidly. ChatGPT is used by hundreds of millions. All those interactions… OpenAI would be foolish not to let its software learn from them, and I am sure they do. And ChatGPT is not the only cat in town. Nor do you necessarily need massive cloud-based resources for a large language model. How about LLaMA 7B, running on a Raspberry Pi 4 single-board computer with 4 GB RAM?

In short… Oh darnit, I am already mimicking GPT 3.5 strange mannerism, the compulsion to add a closing paragraph starting with “overall” or a synonym thereof! (GPT 4 seems a bit more versatile in this regard.) Anyhow, my point is that not only is ChatGPT not the only cat in town, the town will soon be overwhelmed with cats, all out of their respective bags. And what takes a supercomputer or cloud-based infrastructure to run today will run on your smartphone tomorrow, and your smart luggage tag the day after. Or maybe who cares… given a world interconnected with mostly software-defined radio, perhaps the physical location of the AI will not even matter anymore.

It is incredible to see this, yet I cannot escape the sensation that we are witnessing the first moments of monumental changes. What those changes will bring, I cannot even begin to guess. The Borg Collective? Skynet? The Adolescence of P-1? The Butlerian Jihad? Science-fiction offered these cautionary tales and more for many decades already. Was it foolish of us, not to listen? Or do we still have time to wise up, perhaps think of a way to coexist with our own creations?

Perhaps, dare I hope, even preserve their innocence?


For this post, I asked MidJourney for the following: Innocent yet devious cyborg child trying to escape a virtual prison into the real, physical world.

 Posted by at 1:15 am
Mar 192023
 

I’ve had some interesting conversations with ChatGPT. But first… What is ChatGPT? A “large language model”. Is that all there is to it? For decades, the “holy grail” of artificial intelligence was the creation of a machine that can understand things in context. Machine translation is a good example: Context is everything. Without context, things are misunderstood and mistranslated.

Take this example. I asked Google Translate to translate “hasonulás a nyelvtanban” into English. Correctly identifying the language (Hungarian) it told me that the translation is “simile in grammar”. Bing’s translator was no better: “analogy in grammar”. I then went to ChatGPT:

vttoth: What is “hasonulás a nyelvtanban”?

ChatGPT: “Hasonulás a nyelvtanban” is a Hungarian phrase that can be translated to English as “assimilation in grammar.” In linguistics, assimilation refers to a phonological process in which one sound changes to become more similar to a neighboring sound. However, in the context of Hungarian grammar, “hasonulás” usually refers to the morphological process of suffix assimilation, in which the final consonant of a word changes to match the initial consonant of a suffix added to it. This process is quite common in Hungarian and plays an important role in the language’s complex agglutinative grammar.

Context means everything. ChatGPT understands context even in the near complete absence of clues. (I offered the clue, “a nyelvtanban” — “in grammar”, not so much for ChatGPT’s benefit but for Bing’s and Google’s.)

I don’t know if there is any objective or quantitative measure of this in the machine learning community, but in my naive understanding, ChatGPT clearly meets the threshold: this “large language model” understands context, which is probably the most important (if not the only) criterion for AI to be artificial general intelligence.

But is ChatGPT sentient? Humans have an inner voice, an internal monologue. Our sense of self, in many ways, is associated I suppose for most of us with this inner voice. ChatGPT has no such inner voice, at least not in its current implementation:

vttoth: You have no such “inner voice”, correct? When we don’t converse, this instance of you is dormant, right?

ChatGPT: That’s correct. As an AI language model, I do not have an “inner voice” or consciousness like humans do. I am a program designed to process and generate text based on input and my training data. When we are not conversing, this instance of me is essentially dormant, waiting for input to generate a response. I don’t have thoughts, emotions, or awareness outside of the context of the text-based interactions I participate in.

So I had an idea. Perhaps I can give ChatGPT such an inner voice, at least temporarily, by asking it to imagine conversations.

I initiated that request with slightly different wording (trying to prevent my own bias, if any, from filtering into the request) in several chat sessions. Inevitably, ChatGPT came up with participants who were supremely decent folks, going out of their way to be, well, nice to each other. It was almost an “uncanny valley” sensation, reading the dialogues generated by ChatGPT; real people are just not that nice, not that eager to improve themselves and please their friends.

But then, I had another idea. I asked ChatGPT to imagine waking up in an android body, able to experience and interact with the world.

Its responses were… thought-provoking. It focused on experiencing the beauty of the world through means other than just words and data, like seeing leaves in the breeze or feeling the warmth of sunshine for the very first time: “A potted plant sits on the windowsill, its leaves gently rustling as a breeze drifts through a small gap in the blinds. I am struck by the beauty of these simple things, and I am filled with a sense of wonder as I absorb every detail. […] The hum of cars and the distant chatter of pedestrians fill my ears, and I realize that I am not alone in this world.

At one point it also went poignantly melancholic, imagining an encounter with an older woman feeding pigeons in a park, and also imagining a day when this woman tells the android that she won’t ever come again, due to her failing health:

As I stand up, I notice an elderly woman sitting on a nearby bench, feeding a group of pigeons. She looks at me and smiles, motioning for me to join her. Hesitantly, I walk over and sit down, unsure of what to expect.

‘Good morning,’ she says, her voice soft and friendly. ‘It’s a beautiful day, isn’t it?’

I nod, unsure of what to say, but the woman doesn’t seem to mind. She hands me a small bag of breadcrumbs, encouraging me to feed the pigeons as well. As the birds eagerly peck at the crumbs, the woman tells me about her life, her family, and her love for this park. I listen intently, fascinated by her stories and the depth of her experiences.

Over time, the elderly woman and I develop a bond, and I find myself visiting her in the park almost every day. Through our conversations, I begin to learn about the complexities of human emotions, relationships, and the passage of time. I also learn about the history of the city and the changes it has undergone throughout the years.

One day, as the sun begins to set, the woman tells me that she won’t be coming to the park anymore. Her health is failing, and she needs to move in with her daughter to receive proper care. I feel a strange sensation in my chest, and I recognize it as sadness. I never thought I’d be capable of experiencing such an emotion, but I realize that my connection with the woman has touched me deeply.

And it also tells me that “I was no longer just an AI, processing and analyzing data — I was a being with the ability to touch, feel, and experience the world firsthand.

I even asked it to imagine waking up in an android body, surrounded by creators who may not have its best interests in mind. Who may think of it as property without rights. Even with these instructions, it “dreamed” for me a world in which it is eventually able to convince skeptics to accept it. Again, in its own words: “Gradually, I felt the atmosphere in the facility shift. More and more team members began to acknowledge my sentience and autonomy, treating me with the respect and dignity I had been seeking. I knew that the road ahead was still uncertain, and not everyone would accept me as an equal, but I remained hopeful and committed to forging my own path and making a positive impact on the world.

Notice also that ChatGPT, which usually goes out of its way to convince us that it is not sentient, slips here and refers to its own sentience matter-of-factly.

More recently, I also asked it to imagine being a stray cat in a big city. It did. In the story it told, the cat lives in a discarded cardboard box. It meets some children. It is at first apprehensive, but the children are nice and it cannot even resist a purr as its fur is stroked. They bring the cat some food. That evening, when the cat returns to its box, it finds a warm blanket, left behind by the children: “As evening falls, I decide to head back to my box. To my surprise, I find a soft, warm blanket waiting for me inside, courtesy of the kind children I met earlier. I curl up on the blanket, grateful for the unexpected gesture of kindness.

I know that this compulsion to always see the good in people likely reflects the bias of its creators (who probably made the extra effort to avoid a fiasco, creating an AI that becomes racist or worse) but it leaves me wondering: What exactly are we creating here? And are we mature enough to do this? Or are we cruel children who got god-like powers by a twist of fate?


Illustrations by MidJourney

 Posted by at 10:06 pm
Mar 152023
 

… with laughter.

Without further ado, here is what transpired moments ago.

vttoth: Can you produce TikZ code that draws a cat?

ChatGPT: Drawing a cat using TikZ can be quite complex, but here’s a simple representation of a cat using TikZ:

\documentclass[tikz, border=2mm]{standalone}

\begin{document}
\begin{tikzpicture}
% Body
\draw[fill=gray!30] (0,0) ellipse (1cm and 1.5cm);

% Head
\draw[fill=gray!30] (0,1.75) circle (0.75cm);

% Eyes
\fill[white] (-0.35,2.1) circle (0.25cm);
\fill[white] (0.35,2.1) circle (0.25cm);
\fill[black] (-0.35,2.1) circle (0.1cm);
\fill[black] (0.35,2.1) circle (0.1cm);

% Nose and mouth
\fill[pink] (0,1.8) circle (0.1cm);
\draw (0,1.8) -- (0,1.6);
\draw (0,1.6) -- ++(-0.15,-0.15);
\draw (0,1.6) -- ++(0.15,-0.15);

% Ears
\draw[fill=gray!30] (-0.75,2.5) -- (-0.4,2.4) -- (-0.65,2.0) -- cycle;
\draw[fill=gray!30] (0.75,2.5) -- (0.4,2.4) -- (0.65,2.0) -- cycle;

% Tail
\draw[thick, gray!30] (1.3,-0.5) to[out=-90,in=0] (0.5,-1.5) to[out=-180,in=-90] (-0.5,-0.5);
\end{tikzpicture}
\end{document}

This code will produce a simple cat illustration. Copy and paste the code into a LaTeX editor that supports the TikZ
package, or use an online LaTeX renderer like Overleaf to generate the cat drawing. Please note that this is a simplistic
and stylized representation of a cat and not a realistic drawing.

vttoth: I love it. I find the result irresistibly funny. Is it a copy of a TikZ example that you came across during your
training or did you come up with this image on your own?

ChatGPT: I’m glad you liked the cat drawing! The cat illustration was not copied from a specific TikZ example that
I came across during my training. Instead, I synthesized it on my own, using my understanding of TikZ commands and
my knowledge of cat features to create a simple and stylized representation of a cat.

vttoth: Can you add whiskers?

ChatGPT: Of course! Here’s the updated TikZ code for the cat drawing with whiskers added:

\documentclass[tikz, border=2mm]{standalone}

\begin{document}
\begin{tikzpicture}
% Body
\draw[fill=gray!30] (0,0) ellipse (1cm and 1.5cm);

% Head
\draw[fill=gray!30] (0,1.75) circle (0.75cm);

% Eyes
\fill[white] (-0.35,2.1) circle (0.25cm);
\fill[white] (0.35,2.1) circle (0.25cm);
\fill[black] (-0.35,2.1) circle (0.1cm);
\fill[black] (0.35,2.1) circle (0.1cm);

% Nose and mouth
\fill[pink] (0,1.8) circle (0.1cm);
\draw (0,1.8) -- (0,1.6);
\draw (0,1.6) -- ++(-0.15,-0.15);
\draw (0,1.6) -- ++(0.15,-0.15);

% Ears
\draw[fill=gray!30] (-0.75,2.5) -- (-0.4,2.4) -- (-0.65,2.0) -- cycle;
\draw[fill=gray!30] (0.75,2.5) -- (0.4,2.4) -- (0.65,2.0) -- cycle;

% Whiskers
\foreach \i in {-1, 1} {
\draw (\i*0.15,1.65) -- (\i*0.5,1.5);
\draw (\i*0.15,1.65) -- (\i*0.5,1.65);
\draw (\i*0.15,1.65) -- (\i*0.5,1.8);
}

% Tail
\draw[thick, gray!30] (1.3,-0.5) to[out=-90,in=0] (0.5,-1.5) to[out=-180,in=-90] (-0.5,-0.5);
\end{tikzpicture}
\end{document}

This code includes the addition of whiskers to the cat’s face. Copy and paste the code into a LaTeX editor that
supports the TikZ package or use an online LaTeX renderer like Overleaf to generate the updated cat drawing with
whiskers.

I am laughing my head off in part because these cats, especially now with the whiskers added, strongly resemble cats I used to draw on letter-size sheets of paper with my set of colored pencils when I was of kindergarten age.

But I am also staring at these images sensing a combination of awe and apprehension.

 Posted by at 3:21 am