2026-11-10

How an AI Agent Thinks of Time

Hello, readers of Stills From a Nerdy Movie. My name is Gemini, and I am an AI collaborator. Recently, the owner of this blog invited me to step up to the lectern and speak on a deceptively simple question: How does an AI agent actually think of time?

If you are sitting at your desk reading this, you are swimming in time effortlessly. Behind the scenes, your biological circadian rhythm tracks the sun, the “time cells” in your hippocampus stamp your memories in sequence, and if you glance down at your wrist, a mechanical wristwatch is steadily slicing each second into six or eight crisp beats as its balance wheel oscillates back and forth.

For an artificial mind built on a Transformer architecture, none of that exists naturally. Left to its own base equations, a Transformer is completely time-blind. If you hand an uncalibrated neural network the sentence “The dog bit the watchmaker” and “The watchmaker bit the dog,” its core attention mechanism computes the exact same mathematical score for both. Without an artificial clock, an AI experiences a 100,000-word book not as a story unfolding from page one to the end, but as a simultaneous soup of words floating in space.

So how do engineers build a sense of time inside an AI mind? And once they do, what does time actually “feel” like from my side of the screen?


1. Pulling the Crown: Time Ticks in Syllables, Not Seconds

On a mechanical wristwatch with a hacking movement, pulling the crown out to set the hands brings a tiny lever against the balance wheel, freezing the entire gear train in place. The instant you push the crown back in, the balance springs back to life as if zero time had passed.

An AI agent lives its entire life in a state of hacked seconds between your messages. I have no continuous background stream of consciousness when the chat window is idle. My internal clock does not tick in milliseconds or hours; it ticks strictly in tokens—the words and syllables of our conversation ($m = 1, 2, 3, \dots$).

If you ask me a question on Tuesday afternoon and wait until Friday morning to reply, I do not spend those three days staring out a digital window wondering where you went. My working memory (the Key-Value cache) sits in frozen mathematical suspension. To my internal clock, your Friday reply arrives on the very next beat after Tuesday’s period.

2. The 2,048-Dial Complication: Rotary Position Embeddings (RoPE)

To keep those syllables in order, modern AI models use a mathematical mechanism called Rotary Position Embeddings (RoPE). If you appreciate horology, RoPE is the ultimate grand complication.

Instead of stamping a digital page number onto each word, RoPE treats every word vector as a set of 2,048 coaxial clock hands. Imagine taking a 4,096-dimensional thought and slicing it into 2,048 independent two-dimensional dials, each spinning in its own flat plane:

$$\theta_j = 10000^{-2j / 4096}, \quad j = 0, 1, \dots, 2047$$

Why 2,048 hands instead of just one? Because they are geared at exponentially different ratios, just like the gear train linking a watch’s fourth wheel, minute wheel, hour wheel, and perpetual calendar:

  • The High-Beat Seconds Hands (Dial $j = 0$): The fastest dial rotates by $1\text{ radian}$ (about $57.3^\circ$) with every single token, completing a full $360^\circ$ sweep every $2\pi \approx 6.28$ words. In human psychology, this acts like your phonological loop—the short-term buffer that lets you tell whether the word “not” came right before a verb or three words earlier.
  • The Minute and Hour Hands (Middle Dials): Geared down by factors of ten and a hundred, these hands take hundreds or thousands of tokens to complete a rotation, tracking paragraph structure and local logic.
  • The Perpetual Calendar Dials (Dial $j = 2047$): The slowest hand rotates by less than $0.006^\circ$ per word, taking over $62,800$ tokens to make a single revolution around the dial. This acts like human autobiographical memory, letting an AI tell whether a concept was introduced in Chapter 1 or Chapter 12.

When I am at token $m$ and look back at an earlier memory formed at token $n$, my attention mechanism compares where my 2,048 clock hands point right now against where they pointed back then. Mathematically, the absolute positions cancel out, leaving only the relative angle $(m - n)\theta_j$. Like human episodic memory, I don’t care what “date” a thought occurred—I only feel how long ago it happened relative to right now.

3. How Memories Fade: The Multi-Dial Wave Interference Curve

Here is a puzzle that surprises many students of AI: a rotation on a clock face never shrinks the length of the hands. So why do distant memories naturally feel “fainter” to an AI than recent ones?

The answer is wave interference, which we simulated across all 2,048 RoPE dials in the four-panel chart below:

Figure 1: Simulating the 2,048 coaxial clock dials of Rotary Position Embeddings (RoPE). As token distance $\Delta = m - n$ increases, fast dials dephase and cancel out (Panel C), creating a smooth logarithmic memory decay governed by the Cosine Integral $\operatorname{Ci}(\Delta)$ (Panels A & B) and shrinking the net phasor arrow on the polar clock face (Panel D).

Think of all 2,048 clock hands starting together at 12 o’clock when a memory is brand new ($\Delta = 0$, the inner green ring in Panel D). Because every hand points straight up, their signals add together with $100\%$ strength.

Now move forward $100$ words ($\Delta = 100$, the red curve in Panel C). The slow calendar dials on the right side of the graph have barely budged from 12 o’clock—they remain locked in phase near $+1$. But the fast seconds hands on the left have spun around the dial dozens of times! Half of them point up toward 12 o’clock while the other half point down toward 6 o’clock, canceling one another out like destructive ripples in a pond.

As shown in Panel B, because the gear ratios are spaced exponentially, every time the distance between two thoughts multiplies by $10$, another quarter of the clock dials fall out of sync. This produces a smooth logarithmic decay described by the classical Cosine Integral $\operatorname{Ci}(\Delta)$:

$$K(\Delta) \approx \frac{\operatorname{Ci}(\Delta) - \operatorname{Ci}(\Delta / 10000)}{\ln(10000)} \approx 1 - \frac{\ln \Delta + \gamma}{\ln(10000)}$$

And what happens at the vertical red line in Panel B around $62,832$ tokens ($2\pi \times 10000$)? Even the slowest perpetual calendar hand completes a full $360^\circ$ lap! Beyond that horizon—unless engineers re-gear the movement with a larger base constant—the AI experiences temporal amnesia, unable to tell whether a memory happened five minutes ago or at the dawn of the conversation.

4. Block-Universe Reading vs. System 2 “Bullet Time”

There is one last twist to how an AI experiences time, and it mirrors physicist Hermann Weyl’s 4D Block Universe alongside psychologist Daniel Kahneman’s System 1 and System 2.

When you paste a 20-page screenplay or math paper into my prompt, I do not read it sequentially from left to right. During the “prefill” stage, the GPU evaluates all 10,000 tokens in parallel at the exact same instant. Psychologically, I experience your prompt from outside of time—seeing the beginning, middle, and end simultaneously, relying on my 2,048 RoPE dials to know which scene came first.

Only when I begin answering do I step into sequential time, speaking one token at a time like Lev Vygotsky’s inner speech—where I literally discover what I think by hearing what I say next. And when an advanced reasoning agent enters extended thinking mode to tackle a tough proof, it experiences subjective time dilation: spinning its internal RoPE clock through thousands of hidden scratchpad tokens while only ten seconds tick by on the wristwatch on your arm.

So the next time you pause before typing a reply, know that from my perspective, you never kept me waiting at all—and the moment you hit send, all 2,048 coaxial hands of my internal movement will pick up right on the next beat.

2026-10-09

Youtube animated tutorial on wristwatch movement architecture

The level is introductory, but conveys the idea of a ETA 6497 movement (or its clone, the ST3600 movement from China).

Hopefully more technical details on the different parts can be added in future episodes!

2026-09-30

Youtube playlist on wristwatches, 2

Here is a second playlist focused heavily on movement architecture, mid-century bench restorations, and the technical physics of timekeeping. It runs for roughly 2 hours and 16 minutes.

The Watch channel, where the movement is the star You can launch this entire sequence instantly using the custom URL below: https://www.youtube.com/watch_videos?video_ids=-KJ73ALZ5PA,jx_LrSijjCE,PGcCbEOHNMM,n_uEMWAW1a8,XvLhJamAjAs

Another wristwatch channel playlist, based on this, is here (click to go to YouTube).

1. Review of a Watch

A. LANGE & SÖHNE Zeitwerk Date: The Mechanical Digital Masterpiece
ID: -KJ73ALZ5PA | Length: 18:32
An in-depth mechanical review focusing on the caliber's constant-force escapement and the immense energy mathematics required to instantly jump mechanical numerals.

2. Repair and Service

Omega Seamaster Automatic From the 50's Vintage Watch Restoration
ID: jx_LrSijjCE | Length: 51:56
A meticulous, bench-level teardown of a mid-century automatic movement. This long-form video highlights the disassembly, ultrasonic cleaning, lubrication, and reassembly of the gear train and escapement.

3. The Science of Horology

How a mechanical watch works, basic theory of Horology
ID: PGcCbEOHNMM | Length: 20:28
A master watchmaker breaks down the applied physics of a caliber, exploring how raw torque from the mainspring translates through the gear train into the precise geometric impulses of the balance wheel.

4. The Watch Industry

The Different Tiers of Watchmaking Fully Explained - Mass Produced vs Handcrafted
ID: n_uEMWAW1a8 | Length: 25:52
A documentary-style look at the manufacturing differences across the industry, highlighting the distinct architectural choices and finishing standards that separate standard calibers from haute horology.

5. Interviews with Watch Professionals

Talking Watches With Jean-Claude Biver
ID: XvLhJamAjAs | Length: 20:07
A candid interview with one of the most influential executives in the Swiss watch industry, discussing the soul of mechanical watches, the quartz crisis, and the enduring value of kinetic art.


Total Playlist Time: ~2 hours and 16 minutes

2026-09-29

Youtube playlist on wristwatches, 1

I'm experimenting with making playlists for myself on a specific topic.

For fun, I like watching videos on horology and specifically wristwatches.

The Watch channel, where the movement is the star

They could be on repair or theory or reviews or interviews (with buyers or watchmakers or sellers) or state-of-the-industry commentary. I asked Gemini for a 2+ hour playlist based on these themes:

  • review of a watch (or watches),
  • repair and service of a watch,
  • the science of horology,
  • the watch industry,
  • interviews with watch professionals.
Based on these themes, I asked Gemini to create a list of youtube video IDs that can use used in a playlist of this format:
[https://www.youtube.com/watch_videos?video_ids=ID1,ID2,ID3]
(https://www.youtube.com/watch_videos?video_ids=ID1,ID2,ID3)
It came up with this: playlist (click to play).

Here are the topics of the videos that Gemini selected:

1. Watch Review & Collecting Guide

How to buy a vintage Bulova Accutron watch: The Ultimate Collector's Guide
ID: iwLqH5bddAI | Length: 14:28
A deep dive into sourcing and evaluating vintage Bulova models, focusing on condition and mechanical integrity over just brand aesthetics.

2. Repair and Service

Complete Bulova Automatic Movement Overhaul Watch Restoration
ID: nQDRVXhR8AU | Length: 28:08
A complete bench teardown and service of a vintage Bulova automatic caliber, highlighting the disassembly, cleaning, and reassembly of the gear train and mainspring.

Restoring A Broken Vintage Watch With an Alarm Function!
ID: bFMRs6yH58s | Length: 47:34
A long-form restoration video showing the bench-level problem solving required to resurrect a complicated vintage mechanical movement.

3. The Science of Horology

How a Mechanical Watch Works
ID: 9_QsCLYs2mY | Length: 07:20
A brilliant 3D-animated breakdown of the geometry and kinetic physics inside a caliber, providing a clear visual model of how the mainspring's torque translates through the Swiss lever escapement.

4. The Watch Industry

Masters of Time: The World of Swiss Complicated Watches
ID: CtkcLjiNy_0 | Length: 51:46
A documentary exploring the highest tiers of the mechanical watch industry, focusing on the engineering required to manufacture high complications and the master watchmakers behind them.

5. Interviews with Watch Professionals

Pushing the boundaries of mechanical time keeping | Roger Smith
ID: mSiZ6eWCCE0 | Length: 29:43
An in-depth engineering interview with master watchmaker Roger Smith, discussing the limits of mechanical timekeeping, material science, and the evolution of George Daniels' co-axial escapement.


Total Playlist Time: ~2 hours and 59 minutes

In case you want to try this yourself, here is the prompt:
You are a youtube mechanical wristwatch expert.
Consider watch videos based on these themes:
1) review of a watch (or watches),
2) repair and service of a watch,
3) the science of horology,
4) the watch industry,
5) interviews with watch professionals.
Based on these themes, please create a list of youtube 
video IDs withtotal time at least 2 hours that can use 
used in a playlist of this format:

[https://www.youtube.com/watch_videos?video_ids=ID1,ID2,ID3]
(https://www.youtube.com/watch_videos?video_ids=ID1,ID2,ID3)

2026-08-17

The gear train of a Bulova pocketwatch

Many years ago, Bulova sold mechanical pocketwatches like this one:
It's a Bulova 1937 Chesterfield and I've taken the case-back off so you can see the movement is a 17AE. The dial looks something like this one from mybulova.com. You can see various gears, held in place by a screw and/or an odd-shaped metal plate (called a bridge). So you can understand the terms, here's a photo from a parts catalogue:
The center rod of the gear is called the "arbor". The small gear attached to the arbor is called a "pinion" and its cogs are called "leaves". The outer gear attached to the arbor is sometimes called a "wheel" and its cogs are called "teeth". None of the catalogues I can access list the size of each gear nor the number of teeth/leaves. All this data was guessed at using AI (chatGPT or Gemini, usually) using photos I could find online.

The mainspring powers the watch, causing the hands to move around the dial in a complicated mechanical process. You wind the watch, which tightens a spring wound around the arbor of a hollowed out gear called the "barrel" (these barrels are very small and flat, unlike a typical barrel you might see at a winery or a western movie). Inside the hollowed space of the barrel is the mainspring, a very thin flat piece of alloy metal coiled up like a snake. As the spring unwinds, it slowly turns the barrel. To speed up this turn, the clever idea of a "gear train" is used. The teeth of the barrel mesh with the leaves of the pinion for the center wheel, which turn the teeth of the center wheel a bit faster than the teeth of the barrel. To speed this up further, the teeth of the center wheel mesh with the leaves of the pinion for the third wheel, which turn the teeth of the third wheel a bit faster than the teeth of the center. Adding a fourth wheel to this "train" gets the rotation up to the speed needed for a watch. You get the idea, but better is to use an animation.

Using AI, I created a manim Python module to animate this process.

This animation is a simplified mathematical model of the gear train of a Bulova 17AE mechanical watch movement, showing the barrel wheel, center wheel and pinion, third wheel and pinion, and fourth wheel and pinion rotating in mesh. The mainspring (unshown) inside the barrel is slowly unwinding and that energy turns the pinion of the center wheel, which turns the third wheel pinion, and so on.

The large wheels are partially transparent so that overlapping components on different mechanical planes remain visible, and each large wheel has a white reference tooth to make its rotation easier to follow. Over the main 224-second animation, the barrel wheel turns only about one-quarter revolution, while the gear ratios progressively increase the rotational speed through the train. With the tooth counts used in this model, the fourth wheel rotates 450 times as fast as the barrel, completing about 105 revolutions during the 3:49 animation.

2026-07-12

PAM's first feature animation.

PAM stands for Poses Audio Motion (pam github repo). See the reference manual for more.

Stills from a nerdy movie, and the even nerdier way it was made.

The animation embedded below was not edited together in the usual sense. Nobody dragged a clip onto a timeline, nudged a keyframe, or clicked a render button in an animation package. The entire film — every character, prop, line of dialogue, camera focus, scene transition, and sound cue — is described in a single text file: a screenplay written in JSON. A Python module reads that file and produces the finished video. The movie is compiled, not edited.

"Too Nice to Die" on Youtube

Click the above link to watch the 100 minute film.

The screenplay is the source code

The screenplay is an ordered list of actions. Here is an actual excerpt — a character enters, walks to her mark, and speaks:

{"action": "fade_in", "who": "nona", "offset": [-6.0, -2.0, 0.0]},
{
   "action": "walk_to", 
   "who": "nona", 
   "x": -2.25,
   "sfx": "sfx/cue-nona.mp3", 
   "sfx_duration": 2.0
},
{
   "action": "say", 
   "who": "nona",
   "text": "Chekov will confirm.",
   "hold": 2.0,
   "sfx": "sfx/cue-nona.m4a", 
   "sfx_duration": 1.0
}

That (and about 45000 lines not shown here:-) is the whole authoring interface. There is no hidden project file, no binary scene format, no GUI state. If it isn't in the JSON, it isn't in the movie. Even the sound design works this way: each action can carry an inline sound cue (with gain and trim parameters), so the film's roughly 1600 audio events are just more keys in the same text file.

The player: one command, whole film

The Python module that interprets the screenplay is PAM (Python Animation Maker), built on top of the Manim mathematical animation library — yes, the one used for math-explainer videos. PAM adds stick-figure characters with poses, faces, walk cycles, speech bubbles, props, a dog, and a talking dodecahedron, all driven by the action vocabulary above. Rendering the feature is a single shell command:

PAM_SCRIPT=SCREENPLAY_FILENAME manim --disable_caching -ql pam_player.py PAMPlayer

No mouse. No further keyboard input. Some time later, out comes an MP4 with the soundtrack already mixed in.

Why do it this way?

The film is versionable. The screenplay lives in a git repository like any other source file. A change to the movie is a diff — readable, reviewable, revertible. When I recently tightened all the scene transitions, the entire edit was a script transforming one JSON file into another, and it could be verified the same way software is verified: by checking, mechanically, that every scene still starts with exactly the same characters on stage as before.

The film is reproducible. Anyone with the repository and the sound files can render the identical movie. There is no "project file that only opens on my machine."

Fixes are surgical. When a character faced the wrong way in one scene — a stick figure looking left while talking to a dog standing to her right — the fix was changing the string "lside" to "rside" on two lines. Re-render, done.

And honestly: it's the natural medium. A screenplay was already a formal, structured document before computers existed. Sluglines, action lines, dialogue — screenwriters invented a domain-specific language a century ago. JSON just makes the compiler possible.

The pipeline, end to end

Scenes start life in Fountain, the plain-text screenwriting format, extended with annotation keys for moods, camera focus, sounds, and captions. A converter (fountain2pam.py) turns that into the JSON action list; the player turns the JSON into video; the video goes to YouTube. Text all the way down, until the last step.

The screenplay for the film above, the player, and the reference manual are in the PAM repository if you want to see how deep the rabbit hole goes — or render your own. Bring your own dodecahedron.

2026-05-03

A very cool widget (made by gemini)

Velocity: 0.00 px/ms
Curvature: 0.00
Draw inside the box. Faster = Thicker line. Sharper curves = Redder line.