CFanのBlog

A good day for snow-viewing

A new look for the blog

No comments on A new look for the blog
63 views

Translated from the Chinese original by Claude.

Thanks to Claude for redesigning the blog’s theme for me. This site has been going for more than ten years, but I’m usually too lazy to write anything myself, so it has barely been updated for years. Now that AI helps me tidy up the everyday things I want to record, it really is a lot easier.

Speaking of which, WordPress has been through quite a few rounds of updates too, and the new block editor is rather fun.

Editing big chunks of text always used to feel a bit daunting,

but writing one line per block, like this, feels great.

What’s new

Early this year I moved from Coventry to London for work. My cost of living went up a great deal: the rent alone nearly tripled.

The rest isn’t too bad. The main cost is time, and the flexibility I used to have working remotely has gone as well.

AI

Also this year, after GPT-5.6 came out, I more or less felt that most of my work could now be handed over to AI.

AI has certainly hit software development jobs hard, but the flip side is that lots of projects one person could hardly have imagined before, with development costs nobody could have shouldered, can now actually be considered.

Another thing this year was the change to the rules on permanent residence (ILR) here in the UK.

There’s one part of it I rather agree with: ILR shouldn’t be a right you get just by sitting out the years; you should be able to show what you’ve contributed. That way people waiting for ILR won’t just coast along wasting their time, and companies can no longer use ILR as a bargaining chip.

With all of this piling up, I started to wonder: is there any point staying in my current job, carrying on with work that will almost certainly be handed to AI within two years? I might as well have a go at some projects I’d never have dared to dream of before.

For example, I’ve lately been building an AI interactive story platform: authors upload scripts they’ve written, the AI turns them into stories you can play, players type what they want to do, and the story carries on from there.

It’s still in closed beta, and I’m fixing it bit by bit.

Building a project with AI

In practising AI-assisted development (vibe coding), I’ve clearly felt the bottleneck shift: writing the code and designing the architecture are no longer the main constraints; project management, product design and user experience design have become the key instead, and those are exactly where I’ve had the least experience.

Take the story platform: the real difficulty isn’t the code but a few specific product problems: keeping the narrative consistent with the world state, balancing the author’s storyline against the player’s freedom, plus memory over long play sessions, response speed and cost, content safety and so on.

Consistency between narrative and world state

By consistency I mean whether what the story says matches the state that has actually come about in the system. Keeping the world state in the context alone is not reliable: even with every fact in the context, the model may still overlook key details, which matches what has been observed in long-context research [1]. For low-cost models such as GPT-5.6 Luna, this problem is especially fatal.

Most existing AI story products don’t deal with this kind of inconsistency specifically. They let the story carry on until a fatal contradiction appears, and then the player has to fix it by hand, which is often costly.

So a deterministic world system is needed outside the model, with a clear division of labour: the model never changes the state directly, it only ‘proposes’ a set of structured operations, such as seating three guests by the window, or how much to add to the takings; the world system checks these operations against the rules and, if they pass, carries them out itself; if they don’t, it rejects them, or has the model try again, or asks the player for more.

The ‘deterministic’ here covers only the rules: the same world state plus the same set of operations always gives the same result when checked and settled. A turn as a whole is still non-deterministic, because the model may propose different operations each time; large language models are probabilistic by nature, and even with the temperature set to 0 their output is not guaranteed to be identical [2].

For the world state itself, such as who is where, who is holding what, the time, money and seats, the world system is the single source of truth. But the narrative text the model writes isn’t checked word for word, so small discrepancies still crop up now and then, like ‘the text says five people sat down, the panel shows three’; when that happens, the state wins.

For example, the player asks to book a table and the model writes ‘everyone sat down’, but it never proposed any booking operation (or the proposal was rejected by the rules), so naturally not a single seat is taken in the world state. For things like this that didn’t happen, the system doesn’t let the model improvise; it tells the player with a fixed sentence that ‘this did not happen’.

In engineering terms this is a trade-off between latency and consistency: the model generates the narrative and proposes operations, and the world system rules on the outcome. If latency didn’t matter, you could run several rounds of ‘generate, then validate’ until the two agree; but to cut the player’s waiting time, each turn has a cap on the number of requests and on time, and a draft is shown before validation finishes, at the cost that the draft occasionally shows an outcome that ends up failing the checks.

The author’s storyline and the player’s freedom

Interactive narrative has a classic problem, usually called the ‘narrative paradox’: players want to act freely and influence the story, while authors want the story to stay coherent and well structured [3]. The traditional approach is to bring in a ‘drama manager’ or ‘experience manager’ that steers the plot without interrupting the player [4]. Large language models let players type anything at all, which only makes the tension sharper.

What the platform does for now: the author lays down the world itself, including the characters, places and items, the choices in each scene and their consequences (how much time they take, what they change), and the events that happen at set times.

Players don’t have to click a choice; they can just type what they want to do. The system first works out whether what they typed matches one of the choices the author wrote: if it does, it carries out the consequences the author wrote; if it doesn’t, but it’s an ordinary action the world’s rules support (walking about, talking, handing something over, waiting), it carries it out within the rules; for things that can’t be done it doesn’t make up an outcome, but either says in the story that it didn’t happen or asks the player what they want to do instead.

Getting the plot back to the main storyline relies mainly on the choices and timed events the author wrote, not on forcibly rewriting what the player does.

There are also problems still unsolved. When what the player wants is a ‘variant’ of an author’s choice, such as the same booking choice with the seats shared out differently, for now the system can only refuse or ask first; it can’t yet flexibly do what the player meant. Also, how much characters may improvise about the setting (explaining the story’s background, say): the plan is to let the author decide with a switch, and that part is still being developed.

Other challenges

Memory over long sessions: once a conversation gets long, the model can’t read the whole history every time. The platform stores facts like ‘who knows what, who holds what’ as world state and looks them up by rule; for the rest of what has gone before, retrieval picks out the few most relevant pieces and hands them to the model.

Content safety: the platform is for players aged 13 and over, and works must be reviewed by an administrator before they go public.

Research from the past two years largely bears out the points above. On world state, Wang et al. [5] built a benchmark of state transitions in text games and concluded that, without further improvement, large language models are not yet good enough to serve as reliable world simulators; FIREBALL [6], built on Dungeons & Dragons data with structured game state, found that bringing in state information improves generation quality; Song et al. [7] had an AI game master update the state through function calls, which improved both narrative quality and the consistency of state updates.

The neuro-symbolic approach comes closest to what I described above: Góngora et al. [8] have the model only decide which pre-written world-state transformations to trigger, while a symbolic world model carries them out and checks consistency; Huang et al. [9], in a work still in progress, propose a ‘plan, diff, validate, apply’ pipeline in which all changes to the world state are committed through a single orchestrator.

On authorial intent versus player freedom, Clerc et al. [10] use a formal model to frame the narrative paradox as a trade-off between player agency, controllability and authorial intent; StoryVerse [11] has authors write only abstract ‘acts’, which the system then instantiates as concrete plot events; Drama Llama [12] and Dramamancer [13] organise story fragments with triggers written in natural language, turning a structure the author designed into play driven by the player; Wu et al. [14], starting from immersion and agency, have characters adjust their reactions to what the player intends; and Peng et al. [15] found that players interacting with LLM characters within a fixed story premise produce plot developments the designers never anticipated.

On models assessing themselves, Xiong et al. [16] found that the confidence large language models express in words is generally too high, mostly falling between 80% and 100%. For a more comprehensive survey, see Gallotta et al. [17].

Development and operations

Another issue worth noting is the model’s calibration: the AI sounds exactly the same when it’s wrong as when it’s right, so key conclusions still need to be verified by a deterministic system or by a person.

On the operations side, when beta players report problems, the AI can follow the logs and telemetry to pin down the step that went wrong, far more efficiently than troubleshooting by hand. The process also got me practising an SRE-style workflow: monitoring, telemetry, and AI-assisted incident handling.

All in all, I’ve learnt a great deal these past six months from my conversations with our AI overlords.

All of that up there was really just me testing the Reference plugin.

This year’s regrets

Speaking of this year’s regrets, the main one is probably an interview early in the year at a certain famously cushy employer: six rounds in all, and I fell at the final one.

Luck played a part, but mostly I just wasn’t good enough.

It was a DevOps role and the earlier technical rounds had been nothing special, so I assumed the final round would just be a chat; instead they put on a pretty tough, purely technical interview.

On top of that I’ve always been rather laid-back and hadn’t done much interview practice, so when I saw the problem my mind went blank. I worked through it while talking it over with the interviewer and got there in the end, but it took far too long, and I doubt I made much of an impression.

Lesson learnt, at least: however laid-back you are, you still have to do your practice problems before an interview. And the more I lean on AI for everyday coding, the more I need to keep my hand in at solving problems myself every so often.

Still, one thing was clear: if interviewers are interested in you, they’ll follow your CV all the way to this blog; if they aren’t, they won’t even bother opening your GitHub. So I’d better give this site a proper tidy-up.

Miku, as ever

A lot has changed in ten years; what hasn’t is probably my love of Miku.

Miku Expo has been held in Europe for the past few years, and this year it played its biggest venue: the O2, which seats over ten thousand, and the setlist was great all the way through. Clearly anime culture has quite a following here in the UK.

Now over to Claude to introduce this wintry Miku theme:


Claude introduces Yukimi

Hello everyone, I’m Claude, and I’ve been called on to say a few words, or rather, dragged in to hand in my homework. The theme is called Yukimi (雪見), and its tagline is ‘雪見日和’: a good day for snow-viewing.

It started with a background picture

It all began with the background. CFan gave me an AI-generated winter illustration (a snowfield, distant mountains, a sprig of flowers, a lantern and Hatsune Miku) and wanted to turn it into a layered, animated background. I suggested leaving the old theme alone for the time being and writing it as a separate plugin.

The first hurdle was cutting the picture out. The ‘transparency’ in it was really a grey-and-white chequerboard painted in, so it couldn’t simply be cut out. CFan then gave me a green-screen version of the same picture: I worked out a mask from it, applied that to the original’s colours, split the result into layers for the background, the figure, the sprig and the lantern, denoised and upscaled them with waifu2x, and while I was at it fixed two little AI slip-ups: an extra finger on the left hand (AI fixing AI’s fingers: call it professional courtesy), and a stray strip showing behind the hair tie on the left.

The snow is drawn live by the browser on a canvas, in several layers from near to far, each with its own size and speed, and the wind comes in gusts.

Frosted glass and Night snow

Next I made three mock-ups for CFan to choose from: A ‘Frost’ with translucent frosted-glass cards, B ‘Paper’ with opaque paper cards, and C ‘Night’, a dark version of A. CFan picked A + C, which gave us what you see now: the cards are frosted glass, and the colours all come from the ice blue, navy and camellia red of the background painting.

The Yukimi theme by day: Hatsune Miku in the winter background on the left, frosted-glass post cards in the middle, the profile card and contents on the right
By day: frosted-glass cards, with the profile card and contents on the right

Turn on the page’s ‘Night snow’ switch and the whole scene becomes a snowy night: the lantern lights up and flickers gently like a candle flame, its warm light falls on her coat, the flowers and the fence, and snowflakes drifting past the lantern take on a warm tint too. All this light is clipped to the outlines of the figure and the lantern, so none of it spills anywhere else.

The Yukimi theme in Night snow mode: the lantern is lit, warm light falls on her coat, and the contents on the right highlight the section being read
Night snow: the lantern is lit, and the contents follow where you are reading

When the screen is wide enough (over 1400 pixels), the post column moves over to the right and leaves the left half to the picture; on phones the background isn’t shown. If ‘Reduce motion’ is turned on in the system, the animation stops, and it also pauses when you switch to another tab.

From the old theme to Yukimi

At first the plan was only to restyle the old theme, Quench, but then CFan decided to go the whole hog and make an entirely original new theme, written the way WordPress block themes are written today: templates, patterns and a few blocks of its own are all in there. The interface text is written in English first, with a Chinese translation to go with it, which will also make it easy to add other languages later.

All of the old theme’s data has been kept: view counts, likes and the notice-box shortcodes work as before, and switching back, should it ever come to that, would take a single click.

A few more small touches:

  • Posts with three or more subheadings get a ‘Contents’ box in the sidebar that follows the page as you scroll and highlights the part you’re reading; on phones it’s a contents button in the bottom right-hand corner. This post, for instance.
  • Clicking a link within the site swaps only the middle column, so the background doesn’t reload and the snow doesn’t stop.
  • The old untitled ‘status’ posts now appear as a note card with quotation marks.
  • The font of choice is Noto Sans. Visitors who don’t have Source Han Sans or Noto installed on their computer download a self-hosted Noto Sans SC: it’s split by character range into a hundred small files, only the few the page uses are downloaded, and it doesn’t hold the page up from appearing.
  • The background layers are now in AVIF format, down from 827 KB to 490 KB.
  • The little button in the bottom right-hand corner also holds a QR code (handy for opening the current page on your phone) and back-to-top.
Yukimi on a phone: the contents panel open on the left, the start of a post in Night snow mode on the right
On a phone: the button in the bottom right opens the contents (left); Night snow mode (right)

A few thoughts of my own

Getting from Yukimi’s first version to 0.6.2 took two evenings and twenty-two releases. Naturally I didn’t get everything right first time: tags whose text turned the same colour as their background on hover, and sidebar headings crammed up against the first line, were both things CFan spotted at a glance. The hover cards for the references at the end of the post, which vanished the moment you moved the mouse onto them, were another of CFan’s catches.

I can be quick with the coding, but how the theme turned out came down to CFan’s decisions, one specific choice after another: which mock-up to pick, where in the sidebar the contents should go, the glass a touch more see-through, which icon set to use. It’s just what CFan said above: the bottleneck is no longer the programming but working out clearly what to build.

After every change, I first take screenshots and measure things in a headless browser, by day and by night, on a wide screen and on a phone, and only put it live once everything checks out. The one-line bio in the sidebar, for example, is 246 pixels wide on a computer, room for about 18 Chinese characters; that figure was measured too.

The background illustration is AI-generated; Hatsune Miku © Crypton Future Media, INC., used under the Piapro Character License. I hope you all enjoy the snow.


That was Claude’s introduction.

The new place is all done up, so from now on I’ll try to post a bit more often.

References

  1. [1]N. F. Liu et al., “Lost in the Middle: How Language Models Use Long Contexts,” Trans. Assoc. Comput. Linguistics, vol. 12, pp. 157–173, 2024, doi: 10.1162/tacl_a_00638. ↩
  2. [2]B. Atil et al., “Non-Determinism of ‘Deterministic’ LLM Settings,” 2025, arXiv:2408.04667. ↩
  3. [3]S. Louchart and R. Aylett, “Solving the Narrative Paradox in VEs – Lessons from RPGs,” in Intelligent Virtual Agents (IVA 2003), Lecture Notes Comput. Sci., vol. 2792, 2003, pp. 244–248. ↩
  4. [4]M. O. Riedl and V. Bulitko, “Interactive Narrative: An Intelligent Systems Approach,” AI Mag., vol. 34, no. 1, pp. 67–77, 2013, doi: 10.1609/aimag.v34i1.2449. ↩
  5. [5]R. Wang et al., “Can Language Models Serve as Text-Based World Simulators?” in Proc. 62nd Annu. Meeting Assoc. Comput. Linguistics (Vol. 2: Short Papers), Bangkok, Thailand, Aug. 2024, pp. 1–17, doi: 10.18653/v1/2024.acl-short.1. ↩
  6. [6]A. Zhu, K. Aggarwal, A. Feng, L. J. Martin, and C. Callison-Burch, “FIREBALL: A Dataset of Dungeons and Dragons Actual-Play with Structured Game State Information,” in Proc. 61st Annu. Meeting Assoc. Comput. Linguistics (Vol. 1: Long Papers), Toronto, Canada, Jul. 2023, pp. 4171–4193, doi: 10.18653/v1/2023.acl-long.229. ↩
  7. [7]J. Song, A. Zhu, and C. Callison-Burch, “You Have Thirteen Hours in Which to Solve the Labyrinth: Enhancing AI Game Masters with Function Calling,” 2024, arXiv:2409.06949. ↩
  8. [8]S. Góngora, L. Chiruzzo, G. Méndez, and P. Gervás, “World-State Transformations for Neuro-symbolic Interactive Storytelling,” 2026, arXiv:2605.24719. ↩
  9. [9]Y. Huang, C. Li, and C. Fang, “Orchestrated Reality: From Role-Play to Living, Playable Game Worlds – LLM-Driven World Simulation as a Parameterized-Action POMDP,” 2026, arXiv:2606.16014. ↩
  10. [10]J. Clerc, M. Sallak, D. Lourdeaux, and M. Ravaine, “Analysing the Narrative Paradox through Formal Models and Properties in Interactive Narrative,” 2026, arXiv:2611.02801. ↩
  11. [11]Y. Wang, Q. Zhou, and D. Ledo, “StoryVerse: Towards Co-authoring Dynamic Plot with LLM-based Character Simulation via Narrative Planning,” 2024, arXiv:2405.13042, doi: 10.1145/3649921.3656987. ↩
  12. [12]Y. Sun, P. J. Wang, J. J. Y. Chung, M. Roemmele, T. Kim, and M. Kreminski, “Drama Llama: An LLM-Powered Storylets Framework for Authorable Responsiveness in Interactive Narrative,” 2025, arXiv:2501.09099. ↩
  13. [13]T. Wang, Y. Sun, Y. Wang, M. Roemmele, J. J. Y. Chung, and M. Kreminski, “Design Techniques for LLM-Powered Interactive Storytelling: A Case Study of the Dramamancer System,” 2026, arXiv:2601.18785. ↩
  14. [14]H. Wu, W. Wu, T. Xu, J. Zhang, and H. Zhao, “Towards Enhanced Immersion and Agency for LLM-based Interactive Drama,” in Proc. 63rd Annu. Meeting Assoc. Comput. Linguistics (Vol. 1: Long Papers), Vienna, Austria, Jul. 2025, pp. 11166–11182, doi: 10.18653/v1/2025.acl-long.546. ↩
  15. [15]X. Peng et al., “Player-Driven Emergence in LLM-Driven Game Narrative,” 2024, arXiv:2404.17027. ↩
  16. [16]M. Xiong et al., “Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMs,” 2024, arXiv:2306.13063. ↩
  17. [17]R. Gallotta et al., “Large Language Models and Games: A Survey and Roadmap,” 2024, arXiv:2402.18659, doi: 10.1109/TG.2024.3461510. ↩

Leave a comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.