{"@attributes":{"version":"2.0"},"channel":{"title":"atomic14","description":"A collection of slightly mad projects, instructive\/educational , and generally interesting stuff.\nBuilding projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...\n","link":"https:\/\/www.atomic14.com\/","pubDate":"Sun, 15 Nov 2026 16:40:04 +0000","lastBuildDate":"Sun, 15 Nov 2026 16:40:04 +0000","generator":"Jekyll v3.10.0","item":[{"title":"I'm not open-sourcing this - you can build it yourself!","description":"<p>In the before times, when I solved a problem like this, I\u2019d open-source the code. Now I\u2019m not sure there\u2019s much point. There\u2019s a prompt at the end so you can scratch your own itch.<\/p>\n\n<p>I was at a loose end the other day and thought to myself, I wouldn\u2019t mind rewatching a series I watched a while back on Prime.<\/p>\n\n<p>The problem with this seemingly simple task is that Prime has stored the fact that I\u2019ve watched every episode. Even worse, it\u2019s stored the point where I stopped watching each episode - which is invariably at the start of the closing titles.<\/p>\n\n<p>I wanted to start from the beginning, but it insisted on starting where I\u2019d \u201cleft off\u201d.<\/p>\n\n<p>The obvious fix is to reset the watch status on the series. Should be simple\u2026<\/p>\n\n<p>There\u2019s no UI to do this in the Prime app. You have to do it on the web. And when you do, you end up using something aggressively user-unfriendly. Whoever was asked to develop it was evidently told \u201cmake this as difficult to use as possible - we want people to give up\u201d.<\/p>\n\n<p>You can see your watch history. It\u2019s an infinitely scrolling list of all the episodes you\u2019ve watched. There are no filters and no bulk actions. You have to delete each season one day at a time, and every viewing is a separate row. It\u2019s designed to frustrate and annoy you.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-11-15\/prime-watch-history-page.webp\" alt=\"Prime Video's Watch History page: one long list grouped by day, with a separate delete link for every season you watched that day\" \/><\/p>\n\n<p>Of course, nowadays we don\u2019t need to put up with this kind of nonsense. I opened the page in Chrome and set Claude to work driving it. Then I thought: this won\u2019t be the last time I do this. Claude, write me a script. Then came the follow-up thought: screw it, write me a nice app to manage my watch history, with all the bells and whistles.<\/p>\n\n<p>A short time later, we have this thing of beauty!<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-11-15\/prime-watch-overview.webp\" alt=\"Prime Watch: an overview of the whole history, with shows grouped by when you watched them and a Prime Video \/ Netflix switch in the sidebar\" \/><\/p>\n\n<p>And of course we also support dark mode out of the box.<\/p>\n\n<p>This is the point where, in the before times, I\u2019d push it up to GitHub. But why would I? You can build it yourself, with a UI that suits you. Here\u2019s a quick brief for Claude (other coding agents are available).<\/p>\n\n<blockquote>\n  <table>\n    <tbody>\n      <tr>\n        <td>Build me a [macOS<\/td>\n        <td>Windows<\/td>\n        <td>Linux] app for browsing and bulk-deleting my Prime Video and Netflix watch history.<\/td>\n      <\/tr>\n    <\/tbody>\n  <\/table>\n\n  <p><strong>Auth:<\/strong> Embed a web view. If a request comes back signed out, show the web view in a sheet or dialog and load <code class=\"language-plaintext highlighter-rouge\">{base}\/settings\/watch-history<\/code> (Prime redirects to sign-in if needed). Close it once it lands back there. Never touch the password.<\/p>\n\n  <p><strong>API:<\/strong> Run <code class=\"language-plaintext highlighter-rouge\">fetch<\/code> calls as JavaScript inside the web view so they\u2019re same-origin and carry the session cookies. Base URL is <code class=\"language-plaintext highlighter-rouge\">https:\/\/www.primevideo.com\/region\/eu<\/code> (make the region a setting).<\/p>\n  <ul>\n    <li>Read: <code class=\"language-plaintext highlighter-rouge\">GET {base}\/api\/getWatchHistorySettingsPage?widgetArgs={\"nextToken\":\u2026}<\/code>. The <code class=\"language-plaintext highlighter-rouge\">watch-history<\/code> widget has a <code class=\"language-plaintext highlighter-rouge\">nextToken<\/code> for paging and <code class=\"language-plaintext highlighter-rouge\">titles<\/code>: a list of day groups, each with the titles watched that day. Each title has a <code class=\"language-plaintext highlighter-rouge\">gti<\/code>, <code class=\"language-plaintext highlighter-rouge\">titleType<\/code> (season\/movie\/episode), <code class=\"language-plaintext highlighter-rouge\">imageSrc<\/code>, an <code class=\"language-plaintext highlighter-rouge\">actions.REMOVE<\/code> block (<code class=\"language-plaintext highlighter-rouge\">titleIds<\/code>, <code class=\"language-plaintext highlighter-rouge\">token<\/code>) and <code class=\"language-plaintext highlighter-rouge\">children<\/code> for the individual episodes, each with its own REMOVE action.<\/li>\n    <li>Delete: <code class=\"language-plaintext highlighter-rouge\">POST {base}\/api\/activityHistoryTitleUpdate<\/code> with form body <code class=\"language-plaintext highlighter-rouge\">action=REMOVE&amp;titleIds=\u2026&amp;token=\u2026<\/code> and header <code class=\"language-plaintext highlighter-rouge\">x-requested-with: XMLHttpRequest<\/code>. It returns <code class=\"language-plaintext highlighter-rouge\">isSuccess: true<\/code>.<\/li>\n  <\/ul>\n\n  <p><strong>Storage and sync:<\/strong> Keep the history as JSON in the app\u2019s data folder, keyed by day + <code class=\"language-plaintext highlighter-rouge\">gti<\/code>. Incremental sync pages newest-first and stops at the newest day already stored, then replaces those days wholesale. Also add a full re-sync.<\/p>\n\n  <p><strong>Grouping:<\/strong> Prime lists seasons, not series (\u201cREACHER (TV) - SEASON 01\u201d, \u201cThe Expanse - Season 3\u201d). Strip the season suffixes and tags and normalise case and punctuation so the seasons group into one show.<\/p>\n\n  <p><strong>UI:<\/strong> Whatever you like - or just leave it to Claude!<\/p>\n\n  <p><strong>Gotcha:<\/strong> Prime sometimes reports success on deletes for old entries and then keeps them. After deleting, re-read history in the background back to the oldest deleted day and restore anything that\u2019s still there.<\/p>\n<\/blockquote>\n\n<p>I know some people will be thinking, come on man, you\u2019ve done the hard part of building the app, just give it to us. But really, that\u2019s not the hard part anymore. In fact, none of this was particularly difficult.<\/p>\n\n<p>What would be difficult is supporting an open-source project that does this. It\u2019s built on Prime\u2019s undocumented API, so it will break. If I open-sourced it, I\u2019d be signing up for a steady stream of \u201cit\u2019s stopped working\u201d issues. There would also be the usual bunch of feature requests for things I don\u2019t need. Open-source projects can quickly become a thankless task.<\/p>\n\n<p>You\u2019ll note from the screenshot that I also added Netflix - why not, when it\u2019s so easy to add new features?<\/p>\n\n<blockquote>\n  <p><strong>Netflix:<\/strong> Same approach, on <code class=\"language-plaintext highlighter-rouge\">https:\/\/www.netflix.com\/settings\/viewed\/&lt;profile&gt;<\/code>. Netflix lists one row per episode or movie.<\/p>\n  <ul>\n    <li>Read: <code class=\"language-plaintext highlighter-rouge\">POST \/api\/aui\/pathEvaluator\/web\/^2.0.0?method=call&amp;callPath=[\"aui\",\"viewingActivity\",&lt;page&gt;,&lt;size&gt;]<\/code> with form body <code class=\"language-plaintext highlighter-rouge\">param={\"guid\":\"&lt;profile&gt;\"}<\/code>. Page 0 always has 20 rows. The reply includes <code class=\"language-plaintext highlighter-rouge\">vhSize<\/code>, the total row count.<\/li>\n    <li>Delete: the <code class=\"language-plaintext highlighter-rouge\">HideTitleViewing<\/code> GraphQL mutation, posted to <code class=\"language-plaintext highlighter-rouge\">\/graphql<\/code> as a persisted query (by id only; the query text is rejected) with <code class=\"language-plaintext highlighter-rouge\">{videoId, hideAllEpisodes, profileGuid}<\/code>. <code class=\"language-plaintext highlighter-rouge\">hideAllEpisodes: true<\/code> removes a whole series in one go. Read the query id from the page\u2019s scripts, as it changes when Netflix ships a new build.<\/li>\n  <\/ul>\n<\/blockquote>\n\n<p>And you\u2019ve also got the BBC:<\/p>\n\n<blockquote>\n  <p>ok, we also have the bbc being rubbish - https:\/\/www.bbc.co.uk\/iplayer\/continue-watching<\/p>\n<\/blockquote>\n\n<p>So there you go. Everything you need to build your own is above.<\/p>\n\n<p>Of course, it does make you wonder: if building things is this easy now, why do these services have such terrible UIs for managing your watch history?<\/p>\n","pubDate":"Sun, 15 Nov 2026 12:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/11\/15\/im-not-open-sourcing-this","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/11\/15\/im-not-open-sourcing-this.html"},{"title":"Jev Plays Manic Miner","description":"<p>In my <a href=\"\/2026\/09\/28\/manic-miner-from-reinforcement-learning-to-search\">last post<\/a> Claude and I failed to get reinforcement learning to play Manic Miner, and we ended up solving the whole game with plain old search.<\/p>\n\n<p>Around the same time, TypeSafe released <a href=\"https:\/\/docs.typesafe.ai\/introduction\">Jev<\/a>. Jev is what they call a \u201cSystem One\u201d model - the name comes from the fast, instinctive kind of thinking, as opposed to slow, deliberate reasoning. It doesn\u2019t generate text, it makes decisions.<\/p>\n\n<p>You give it some information about the situation (as JSON), a paragraph of instructions, and a list of options, and it tells you how likely it thinks each option is to be the right one. It\u2019s fast (around 270ms per decision for me) and cheap - a complete attempt at a cavern costs about half a cent.<\/p>\n\n<p>Jev has already been used to play plenty of games. TypeSafe\u2019s launch demos had it <a href=\"https:\/\/www.theregister.com\/ai-and-ml\/2026\/09\/16\/typesafe-ai-debuts-model-for-machines-that-plays-doom\/5296711\">playing Doom<\/a> from structured game state, and playing <a href=\"https:\/\/typesafe.ai\/blog\/introducing-system-one-models-and-jev\">Wikiracing<\/a> (get from one Wikipedia page to another using only links). People have since built <a href=\"https:\/\/www.mindstudio.ai\/blog\/jev-real-time-game-demos\">Minecraft, Subway Surfers and driving demos<\/a>, and there\u2019s a <a href=\"https:\/\/github.com\/rmalde\/minecraft-agent\">Minecraft speedrun agent<\/a> that pairs a planner with Jev.<\/p>\n\n<p>So: can Jev play Manic Miner? For anyone who missed the last post - you control Miner Willy, and in each of the 20 caverns he has to collect all the keys and then get to the exit, without touching an enemy, falling too far, or running out of air.<\/p>\n\n<p>This has been a pretty interesting experiment. There is also a big caveat in this work - there are probably better ways to present the information to Jev and get better decisions. More research is required.<\/p>\n\n<p>It\u2019s also entirely possible that we just aren\u2019t giving Jev good facts to work on. How do you describe a cave from Manic Miner in text?<\/p>\n\n<p>At first I thought Jev was smashing it - performing much better than I expected.<\/p>\n\n<p>Then I tested things using a very simple algorithm-based solution - this made me think that maybe Jev wasn\u2019t doing anything clever at all.<\/p>\n\n<p>But, after a bit more investigation, I came back to the conclusion that Jev was actually doing something useful.<\/p>\n\n<p>And then we fixed the information we were giving it, and the simple algorithm pulled ahead again.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/jev-plays.webp\" alt=\"Jev playing Central Cavern (one of our recorded runs). Willy is the white figure. The yellow box is the key Jev has chosen to go for, and the bars are its probabilities for the top three moves - this is sped up quite a bit\" \/><\/p>\n\n<h2 id=\"describing-the-game-to-jev\">Describing the game to Jev<\/h2>\n\n<p>Jev isn\u2019t multimodal - I can\u2019t just hand it a screenshot and say \u201cwhat should Willy do?\u201d. It also doesn\u2019t do reasoning or planning. It makes one quick judgement from what\u2019s in front of it.<\/p>\n\n<p>My first thought was to give it a map of the cavern as text. This is an ASCII map of Central Cavern at the start of a run:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>#........A.X....X............B.#\n#...............C..............#\n#..............................#\n#..............................#\n#......................XD..X...#\n#=============~~~~=~~~~========#\n#.............................E#\n#===.........GG................#\n#............GG..###.X.........#\n#====...&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;...#\n#............................==#\n#..............................#\n#...........X.......###~~~~~===#\n#.WW.===============.........PP#\n#.WW.........................PP#\n#==============================#\n<\/code><\/pre><\/div><\/div>\n\n<p>Each character is one cell of the screen. <code class=\"language-plaintext highlighter-rouge\">WW<\/code> is Willy (he\u2019s two cells wide and two high, and so are the guardians and the portal), <code class=\"language-plaintext highlighter-rouge\">A<\/code> to <code class=\"language-plaintext highlighter-rouge\">E<\/code> are the keys, <code class=\"language-plaintext highlighter-rouge\">P<\/code> is the exit portal, <code class=\"language-plaintext highlighter-rouge\">G<\/code> is a guardian, <code class=\"language-plaintext highlighter-rouge\">X<\/code> is a nasty (the poisonous plants and stalactites), <code class=\"language-plaintext highlighter-rouge\">=<\/code> is floor, <code class=\"language-plaintext highlighter-rouge\">~<\/code> is crumbling floor, <code class=\"language-plaintext highlighter-rouge\">&lt;<\/code> is the conveyor, <code class=\"language-plaintext highlighter-rouge\">#<\/code> is wall, and <code class=\"language-plaintext highlighter-rouge\">.<\/code> is empty space. Jev gets a legend that explains all of this.<\/p>\n\n<p>To a person, that\u2019s a pretty good description - you can trace the whole route on it. Jev can\u2019t.<\/p>\n\n<p>You can see this when we ask Jev which key to go for next. It gets this map, plus a few facts about each key, like which side it\u2019s on and how far away it is. Key D sits on the same top floor as keys A, C and B, and the only way up to that floor is at its far left end. So once Willy has collected E, a good order is A, C, D, B, walking right along the top floor.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/jev-key-decision.webp\" alt=\"Jev's key decision in Central Cavern, straight after collecting E. The key letters are drawn on for this post - Jev only sees them in its text map\" \/><\/p>\n\n<p>Jev picks D, the key that looks nearest - on the facts, D is 5 cells away and A is 20. And it picks D every single time - in all 977 of our recorded runs that got this far, through nearly two weeks of changes to the harness. D gets a probability of about 0.8, and A about 0.04.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/jev-key-problem.webp\" alt=\"The key problem in Central Cavern: Jev's choice after E, and the route that works\" \/><\/p>\n\n<p>Going for D isn\u2019t a disaster - Willy has to go all the way round to the left either way. But Jev didn\u2019t see that. In one run, Willy collected E at decision 14, and it took until decision 67 before he found the way up at the left and got his next key (he picked up A, then C, on the way to D). When asked again at decisions 40 and 65, Jev was even more sure about D (0.92 and 0.90).<\/p>\n\n<p>Claude (a reasoning model) worked it out from the same map: Willy can only reach the top floor from the far left, so he meets the keys in the order A, C, D, B as he walks right. Following a route across four floors takes several steps of reasoning, and Jev makes one quick judgement.<\/p>\n\n<p>It\u2019s the same for moves. We tried showing Jev the map as it would look after each possible move, with no hint about which way to go. It finished 1 run of Central Cavern out of 20, and most runs got one key or none.<\/p>\n\n<p>Reading a route off a map is not Jev\u2019s strong point. We need to describe what is happening - including which way to go.<\/p>\n\n<p>This description is what our harness is responsible for - all the code that sits between the game and Jev. Claude built it <a href=\"https:\/\/github.com\/atomic14\/manic-miner-jev\">around the emulator<\/a> and it does quite a bit of work. A slightly worrying amount of work to me.<\/p>\n\n<ul>\n  <li>It reads Willy, the guardians, the keys, and the tiles out of the Spectrum\u2019s memory.<\/li>\n  <li>It tries all six moves (walk left\/right, jump left\/right\/up, and wait) in the emulator. So we know exactly what each move does.<\/li>\n  <li>It throws away any move that kills Willy or does nothing (i.e. Willy stays in the same place). It also throws away moves into a dead end: for each move, it plays up to four more moves ahead in the emulator to check that Willy can still stay alive - this is where it starts to feel like we are getting into the realm of cheating.<\/li>\n  <li>It turns everything into facts relative to Willy, including some memory: \u201cWilly has been here before\u201d, \u201cWilly already tried this move from here\u201d.<\/li>\n  <li>For each move, it adds a fact called <code class=\"language-plaintext highlighter-rouge\">progress<\/code>: does this move take Willy \u201cnearer\u201d to where he needs to go, or \u201cfarther\u201d away?<\/li>\n<\/ul>\n\n<p>To play the game, we run the cavern, collect all the facts and possible moves and then ask Jev to pick the best move.<\/p>\n\n<div class=\"language-json highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"p\">{<\/span><span class=\"w\">\n  <\/span><span class=\"nl\">\"target\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"what\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"selected key\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"side\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"right\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"horizontal_cells\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"mi\">16<\/span><span class=\"p\">,<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"height\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"higher\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"way_up\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"side\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"right\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"horizontal_cells\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"mi\">6<\/span><span class=\"w\"> <\/span><span class=\"p\">}<\/span><span class=\"w\">\n  <\/span><span class=\"p\">},<\/span><span class=\"w\">\n  <\/span><span class=\"nl\">\"to_the_left\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"first_thing\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"nasty\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"distance_cells\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"mi\">1<\/span><span class=\"w\"> <\/span><span class=\"p\">},<\/span><span class=\"w\">\n  <\/span><span class=\"nl\">\"guardians\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">[<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"side\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"same column\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"height\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"higher\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"direction\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"at Willy\"<\/span><span class=\"w\"> <\/span><span class=\"p\">}<\/span><span class=\"w\"> <\/span><span class=\"p\">],<\/span><span class=\"w\">\n  <\/span><span class=\"nl\">\"progress_measures\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"distance to the way up\"<\/span><span class=\"p\">,<\/span><span class=\"w\">\n  <\/span><span class=\"nl\">\"moves\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"walk_right\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"movement\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"Willy moves 1 cell to the right\"<\/span><span class=\"p\">,<\/span><span class=\"w\">\n                    <\/span><span class=\"nl\">\"progress\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"nearer\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"place\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"new place\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"tried_from_here\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"no\"<\/span><span class=\"w\"> <\/span><span class=\"p\">},<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"jump_left\"<\/span><span class=\"p\">:<\/span><span class=\"w\">  <\/span><span class=\"p\">{<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"movement\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"Willy moves 4 cells to the left\"<\/span><span class=\"p\">,<\/span><span class=\"w\">\n                    <\/span><span class=\"nl\">\"progress\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"farther\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"place\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"visited before\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"tried_from_here\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"no\"<\/span><span class=\"w\"> <\/span><span class=\"p\">},<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"wait\"<\/span><span class=\"p\">:<\/span><span class=\"w\">       <\/span><span class=\"p\">{<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"movement\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"Willy stays in the same place\"<\/span><span class=\"p\">,<\/span><span class=\"w\">\n                    <\/span><span class=\"nl\">\"progress\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"same\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"place\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"visited before\"<\/span><span class=\"p\">,<\/span><span class=\"w\"> <\/span><span class=\"nl\">\"tried_from_here\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"no\"<\/span><span class=\"w\"> <\/span><span class=\"p\">}<\/span><span class=\"w\">\n  <\/span><span class=\"p\">},<\/span><span class=\"w\">\n  <\/span><span class=\"nl\">\"moves_not_offered\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">{<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"walk_left\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"kills Willy: nasty\"<\/span><span class=\"p\">,<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"jump_right\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"kills Willy: guardian\"<\/span><span class=\"p\">,<\/span><span class=\"w\">\n    <\/span><span class=\"nl\">\"jump_up\"<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">\"no effect: Willy stays in the same place\"<\/span><span class=\"w\">\n  <\/span><span class=\"p\">}<\/span><span class=\"w\">\n<\/span><span class=\"p\">}<\/span><span class=\"w\">\n<\/span><\/code><\/pre><\/div><\/div>\n\n<p>Along with this comes a paragraph of instructions that explains the goal and what each fact means. Jev\u2019s answer: <code class=\"language-plaintext highlighter-rouge\">walk_right<\/code> 0.71, <code class=\"language-plaintext highlighter-rouge\">wait<\/code> 0.18, <code class=\"language-plaintext highlighter-rouge\">jump_left<\/code> 0.11. It picks <code class=\"language-plaintext highlighter-rouge\">walk_right<\/code>.<\/p>\n\n<p>Every so often, Jev also decides which key to go for next, as in the Central Cavern example above. <code class=\"language-plaintext highlighter-rouge\">progress<\/code> is then measured towards whichever key it picked.<\/p>\n\n<h2 id=\"first-impression-jev-is-smashing-it---this-is-amazing\">First impression: Jev is smashing it - this is amazing!<\/h2>\n\n<p>With all that in place, Jev completed Central Cavern in 10 runs out of 10. The Menagerie and a couple of the one-key caverns went well too. It felt pretty good - although, looking back, those are the easier caverns, and most of the caverns were never completed at all.<\/p>\n\n<p>The map did help Jev\u2019s key choices in a direct test. We asked it for the next key in 13 situations from the first four caverns. With the map and the facts together, it picked the same key as our completed runs in 12 of 13, against 5 of 13 with the facts alone. In Central Cavern, the map made it start with E instead of D. But better key choices didn\u2019t lead to more completed runs. When Claude chose the key order for the first four caverns and Jev did the moves, Jev didn\u2019t complete any more runs than with its own key choices.<\/p>\n\n<h2 id=\"second-thoughts-is-jev-actually-doing-anything\">Second thoughts: is Jev actually doing anything?<\/h2>\n\n<p>Working with Claude driving Jev was an interesting experience. Claude was able to analyse each run and determine where and why Jev got stuck. And Claude was able to suggest better facts to get it unstuck.<\/p>\n\n<p>The problem is, every \u201cbetter\u201d fact moves more of the \u201cintelligence\u201d into the harness.<\/p>\n\n<p>The biggest one of these is <code class=\"language-plaintext highlighter-rouge\">progress<\/code>. When the key is on the same floor as Willy, \u201cnearer\u201d means nearer to the key. When the key is on a different floor, the harness works out a way up (or down) from the map, and \u201cnearer\u201d means nearer to that spot.<\/p>\n\n<p>After a while, <code class=\"language-plaintext highlighter-rouge\">progress<\/code> starts to resemble a very obvious hint of the route to take through the cavern. There\u2019s a real danger of solving the cavern using search and then presenting Jev with a bunch of moves along with a massive hint on which one to pick.<\/p>\n\n<p>Instructions did seem to make a big difference. One of the difficulties here is that Claude does talk like an absolute lunatic sometimes, and it channels this into the instructions:<\/p>\n\n<blockquote>\n  <p>\u201cIf Willy comes back to the same places again and again, the direct way is closed, and he must go a different way, even if that way goes away from the target first.\u201d<\/p>\n<\/blockquote>\n\n<p>Amazingly, this did actually seem to help!<\/p>\n\n<p>So, we\u2019ve got a real danger of actually just being able to run the harness and then pick the \u201cbest\u201d move presented by the harness without needing to use Jev at all.<\/p>\n\n<p>This basic algorithm works very well:<\/p>\n\n<ol>\n  <li>If a move completes the cavern or collects a key, pick it.<\/li>\n  <li>Otherwise pick a move that\u2019s \u201cnearer\u201d according to the harness.<\/li>\n  <li>Otherwise pick any move.<\/li>\n<\/ol>\n\n<p>This simple set of rules can\u2019t choose the key order, so we gave it a known-good key order for each cavern, and gave Jev the same order for comparison. We ran each cavern 10 times, and measured how far each run got: the share of the cavern\u2019s keys and portal it reached. A complete run is 100%, and a run that collects 3 of 5 keys is 50% (3 of 6).<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/jev-progress-first.svg\" alt=\"The first comparison: how far Jev and the three-line rule got in each cavern\" \/><\/p>\n\n<p>Across the whole game, Jev reached 31% of all the keys and portals, and the rule 26%. Both finished Central Cavern every time and The Cold Room most of the time. Jev picked a move the rule could also have picked in 93% of its decisions, against 54% for a random move. Take <code class=\"language-plaintext highlighter-rouge\">progress<\/code> away and Jev almost never finishes a cavern. Random moves barely get started (4%).<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/jev-vs-rule.webp\" alt=\"Willy's path in Central Cavern with Jev (teal, 112 decisions) and with the three-line rule (orange, 130 decisions). Same key order, almost the same route\" \/><\/p>\n\n<p>So my conclusion at this point was: Jev can play Manic Miner, but the harness is actually doing all the work.<\/p>\n\n<p>Why do so many caverns stop partway? Most of those runs didn\u2019t die - they got stuck, walking back and forth until 30 moves passed with nothing new. In several caverns Jev got about halfway and then stalled. The harness only knows the way to the next floor, and in caverns where the route winds across several floors, \u201cnearer\u201d leads straight into a loop. It\u2019s highly likely that the \u201cfacts\u201d we are presenting Jev work well on the first three caverns, because they are the ones we tested and tuned against.<\/p>\n\n<h2 id=\"digging-deeper\">Digging deeper<\/h2>\n\n<p>After some deep thinking from Claude, we tried some more experiments.<\/p>\n\n<p>We added a second simple rule, just for keys - \u201cgo for the nearest key\u201d - and gave it to both Jev and the algorithm.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/jev-progress-like-for-like.svg\" alt=\"Like for like: how far Jev and the three-line rule got in each cavern, over 20 runs each\" \/><\/p>\n\n<p>With the same key choice, Jev now got clearly further than the rule: 39% of all the keys and portals against 25%, and it finished caverns about twice as often. The same happened when both used the nearest-key rule (32% against 19%). That\u2019s very unlikely to be luck - roughly a 1 in 1,000 chance.<\/p>\n\n<h2 id=\"on-some-caverns-jev-is-better\">On some caverns Jev is better<\/h2>\n\n<p>Jev stands out in two caverns, Wacky Amoebatrons and Amoebatrons\u2019 Revenge: it finishes most runs there, and the algorithm almost never does. It also gets much further than the algorithm in Processing Plant and The Sixteenth Cavern, although it doesn\u2019t finish those.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/jev-amoebatrons.webp\" alt=\"Wacky Amoebatrons: Jev's routes, and where the algorithm died\" \/><\/p>\n\n<p>In Wacky Amoebatrons, Jev completed 9\/10 runs. The algorithm completed 1\/10 runs. The algorithm almost always ends up at the same spot on the bottom floor, where it shuffles back and forth until it\u2019s trapped by the guardians coming down - by the time it dies, every move is fatal. Jev passes through that spot in some of its runs too, but it moves on. In Amoebatrons\u2019 Revenge, Jev completed 7\/10 runs, and the algorithm 1\/10, mostly because it got stuck going round in a loop.<\/p>\n\n<p>So what is Jev doing that the algorithm isn\u2019t? The algorithm only looks at two things: does a move collect a key, and is it \u201cnearer\u201d. Jev also gets facts about the guardians that walk left and right: which side they\u2019re on, how far away they are, and whether they\u2019re heading towards Willy. (It gets nothing about the up-and-down ones - we tried that early on, and it made things worse. Maybe information overload?)<\/p>\n\n<p>To test whether those guardian facts matter, we ran Jev without them. In 18 of the 20 caverns it made no measurable difference - removing the moves that kill Willy is enough. But in the two Amoebatron caverns, Jev\u2019s results roughly halved: 17\/20 down to 7\/20 complete runs in Wacky Amoebatrons, and 13\/20 down to 6\/20 in Amoebatrons\u2019 Revenge. So in exactly the caverns where Jev beats the algorithm, it\u2019s the guardian facts that it\u2019s using.<\/p>\n\n<p>Even without the guardian facts, Jev still did a bit better than the algorithm there, so it gets something from the other facts too - probably the memory facts (\u201cWilly has been here before\u201d, \u201cWilly already tried this move from here\u201d), which the simple algorithm ignores. We gave the algorithm the memory facts as well: it now prefers a \u201cnearer\u201d move that Willy hasn\u2019t tried before. That helped it a little in these two caverns, but it got nowhere near Jev.<\/p>\n\n<p>Two more things we checked:<\/p>\n\n<ul>\n  <li><strong>Jev\u2019s top choice really matters.<\/strong> Instead of playing Jev\u2019s top choice, we tried picking a move at random, weighted by Jev\u2019s probabilities. That got through only 18% of the game, against 33% for Jev\u2019s top choice (both with Jev choosing its own keys). Jev\u2019s top choice is far better than a weighted coin toss.<\/li>\n  <li><strong>The difference builds up over a run.<\/strong> We took 300 moments where Jev chose a move the algorithm wouldn\u2019t have, played Jev\u2019s move and the rule\u2019s move from the same saved game, and then let the rule play on from both. On average, Jev\u2019s move led to slightly more keys. Each of Jev\u2019s choices is a little better than the algorithm\u2019s.<\/li>\n<\/ul>\n\n<h2 id=\"fixing-the-facts\">Fixing the facts<\/h2>\n\n<p>After all that, Claude went back through the failed runs and asked why it failed - was it Jev or our harness. In 122 of the 166 failed runs of one measurement, the facts had let Jev down: either no move was \u201cnearer\u201d, or the \u201cnearer\u201d moves went round in a loop.<\/p>\n\n<p>So we fixed the facts. Instead of guessing a \u201cway up\u201d from the text map, the harness now explores the cavern in the emulator. It tries every move from every place Willy can reach, with the guardians switched off. \u201cNearer\u201d now means fewer moves along a route that really exists. We\u2019re back to having search solve the cavern\u2026<\/p>\n\n<p>It also turned up something embarrassing. With our six moves, three of the caverns looked impossible. A search found no route through Processing Plant, Return of the Alien Kong Beast or Solar Power Generator, and none of our 1,349 runs of them had ever finished. A walk always ends on the cell grid, and some jumps have to start half a cell over. Two extra \u201chalf step\u201d moves fixed that - with them, the search finds a route through every cavern.<\/p>\n\n<p>With the true facts, both Jev and the algorithm did far better - and this time the algorithm came out on top. Here, Jev chose its own keys and the algorithm went for the nearest key:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Share of all the keys and portals<\/th>\n      <th>Old facts<\/th>\n      <th>True facts<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Jev<\/td>\n      <td>33%<\/td>\n      <td>60%<\/td>\n    <\/tr>\n    <tr>\n      <td>Algorithm<\/td>\n      <td>22%<\/td>\n      <td>71%<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>In complete runs, Jev went from 28 to 89 out of 200, and the algorithm from 20 to 114. With the same known-good key order for both, it\u2019s 71% against 55%, and 125 complete runs against 86. That\u2019s very unlikely to be luck - about a 1 in 7,000 chance. Between them, they\u2019ve now finished 19 of the 20 caverns.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/jev-progress-true-facts.svg\" alt=\"True facts, like for like: how far Jev and the three-line rule got in each cavern, over 10 runs each\" \/><\/p>\n\n<p>Two caverns got worse for both of them. The true facts know the route, but not the guardians. In The Sixteenth Cavern, guardians trapped Willy at the left end of the bottom floor in every run, before he got a single key. Solar Power Generator went much the same way with the known-good key order.<\/p>\n\n<p>Jev still picks a \u201cnearer\u201d move about 90% of the time when there is one. But now that the facts are right, its other choices cost it runs: it waits just as a guardian comes down, or it goes round in a loop. When several moves are \u201cnearer\u201d, the algorithm picks one at random, and that does better. Even Jev\u2019s lead in the two Amoebatron caverns shrinks, because the algorithm no longer gets trapped there.<\/p>\n\n<h2 id=\"so-is-jev-any-good\">So is Jev any good?<\/h2>\n\n<p>For this game, most of Jev\u2019s edge came from coping with bad facts. Where the harness\u2019s hints led into a loop or a trap, Jev sometimes found its way out. Once the harness knows the real route, the three-line algorithm beats it.<\/p>\n\n<p>We also tried Claude Haiku (through the <code class=\"language-plaintext highlighter-rouge\">claude<\/code> command-line tool) with the same facts. It completed Central Cavern in the one run we tried, in 123 decisions, which is not far off what Jev needs (78 to 138 in our runs). But each decision took almost 18 seconds - against Jev\u2019s quarter of a second.<\/p>\n\n<p>Everything is on <a href=\"https:\/\/github.com\/atomic14\/manic-miner-jev\">GitHub<\/a>: the harness, the summaries of every measurement in this post, and a viewer that replays the recorded example runs and shows exactly what Jev was given for each decision.<\/p>\n\n<p>If you see an \u201cAI plays a game\u201d demo - with Jev or anything else - swap the model for a dumb algorithm and see what happens\u2026<\/p>\n\n<p>Moral of the story? Same as last time - you can get a very long way with basic algorithms.<\/p>\n","pubDate":"Tue, 29 Sep 2026 12:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/09\/29\/jev-plays-manic-miner","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/09\/29\/jev-plays-manic-miner.html"},{"title":"Failing to solve Manic Miner with RL","description":"<p>Around 10 years ago Google DeepMind showed that you could use <a href=\"https:\/\/www.bbc.co.uk\/news\/science-environment-31623427\">deep reinforcement learning to play video games<\/a>. It\u2019s something that I found fascinating at the time and wanted to try but never had the time to really look into it.<\/p>\n\n<p>With LLMs now being able to do a lot of the heavy lifting for me, I\u2019ve started to work through my backlog of \u201cthis is interesting - I\u2019d like to try it out\u201d.<\/p>\n\n<p>I grew up in the 70s and 80s and my childhood computer was the ZX Spectrum, and my <a href=\"https:\/\/www.esp32rainbow.com\/\">ESP32 Rainbow project<\/a> has given me a nice emulator that I can use to both play games and experiment with.<\/p>\n\n<p>Manic Miner was one of the first games we purchased and I wasted a lot of time playing it. I have vague memories of progressing reasonably far, but never actually completing the game. So I naively thought - Reinforcement Learning - why not? Some <a href=\"https:\/\/www.mrkwatkins.co.uk\/teaching-an-ai-to-play-zx-spectrum-games\/\">cursory googling<\/a> would have told me it was not suitable, but I\u2019ve never really been one for doing a lot of up-front research before diving in.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/title-and-start.webp\" alt=\"The title screen, and the game starting\" \/><\/p>\n\n<p>The emulator that I have for the ESP32 also compiles into a desktop application (and there\u2019s a WebAssembly version as well). Running it at full speed is about 1000 times faster than the original machine - so in theory we are in a good position to get something working.<\/p>\n\n<p>There are also some really good resources for Manic Miner - <a href=\"https:\/\/skoolkit.ca\/disassemblies\/manic_miner\/\">this site<\/a> is particularly good. Very handy when Claude is being an absolute doofus head.<\/p>\n\n<p>The idea that Claude and I came up with (and of course Claude was super enthusiastic about\u2026) was to wrap the emulator as a <a href=\"https:\/\/gymnasium.farama.org\/index.html\">Gym<\/a> environment, give the agent a reward for doing well, and run <a href=\"https:\/\/en.wikipedia.org\/wiki\/Proximal_policy_optimization\">PPO<\/a> until Willy walks out of Central Cavern. How hard can this possibly be\u2026<\/p>\n\n<p>This failed miserably. The initial attempt was to just use joystick movements to drive Willy around. We then tried creating a set of move \u201cmacros\u201d, e.g. jump right, jump left, walk right. And still didn\u2019t get anywhere with the RL approach.<\/p>\n\n<p>Claude then suggested that what we were lacking was a good reward function, and that what we should do was solve the problem via search and then feed the route into the RL algorithm and use that to help guide the algorithm.<\/p>\n\n<p>This really should have set off some alarm bells in my head.<\/p>\n\n<p>We spent a lot of time messing around with searching and then feeding the path into the RL algorithm and started to get some results - but ultimately the question ends up being - \u201cif we can solve this with search, what is RL adding?\u201d.<\/p>\n\n<p>So, eventually, after a lot of wasted time, we pivoted to just doing that - why don\u2019t we just try and find the fastest route through each cavern using search.<\/p>\n\n<p>Should be simple, shouldn\u2019t it?<\/p>\n\n<p>There are a couple of things that make it tricky. There isn\u2019t a simple graph that we can search (see later to learn I was wrong). The search space is very large, we have moving guardians, sometimes quite a few of them, this explodes the search space. Every position Willy can end up in gets multiplied by all the possible guardian positions.<\/p>\n\n<p>The order you collect items in can have a big influence on the length of the path - and you need to collect all the keys - this turns into a bit of a travelling salesman problem. What order should we collect them in?<\/p>\n\n<p>Some caverns have switches that change the layout - once again the search space gets quite big.<\/p>\n\n<p>Our first working version was a two pass system. The first pass runs with the guardians set as harmless and ignored. This lets us find the optimum path and item order.<\/p>\n\n<p>The second pass takes this route and searches along it but waits and jumps to avoid the guardians.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/paths-cavern0.webp\" alt=\"Pass one's path and pass two's route in Central Cavern\" \/><\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/cavern0-harmless-vs-live.webp\" alt=\"Central Cavern side by side: harmless guardians (pass one) vs live guardians (pass two)\" \/><\/p>\n\n<p>The most expensive cavern is Return of the Alien Kong Beast, which has five items and two switches, and so 5,040 possible orders of collecting items. That one cavern took 8 hours to search.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/paths-cavern11.webp\" alt=\"Return of the Alien Kong Beast, with both switches\" \/><\/p>\n\n<p>Some of the caverns are very complicated, there are a lot of guardians, so waiting and jumping at the right time becomes critical.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/cavern10-live.webp\" alt=\"Attack of the Mutant Telephones\" \/><\/p>\n\n<p>This did get us a complete run through of Manic Miner - every cavern solved. 39,091 frames, which is about 13 minutes of play.<\/p>\n\n<lite-youtube videoid=\"MITLC1E9R_Y\" playlabel=\"The two pass run through Manic Miner\"><\/lite-youtube>\n\n<p>The problem was it took around a day of computer time to find it, and 92% of that time was spent in the emulator. Every move the search tried had to be run through a full Z80 emulation, and even at 1000 times real speed it\u2019s pretty slow.<\/p>\n\n<p>So we took the emulator out of the search. Willy\u2019s movement is pretty simple - he walks 2 pixels per tick, jumps follow a fixed table, falls speed up and kill you if they\u2019re too long, and crumbling floors and conveyors do what you\u2019d expect. Claude went through the disassembly and wrote a model of all of this, and of the guardians, so the search can step through the game without running the emulator.<\/p>\n\n<p>Most of the guardians don\u2019t react to Willy at all - where they are just depends on how long you\u2019ve been in the cavern. Eugene, the Kong Beast are the exceptions. So we could drop the harmless guardians pass and do a single A* search with the guardians live. The inner loop is in C++ and does around 690,000 states a second.<\/p>\n\n<p>Every route the search finds still gets played back through the emulator, and if Willy dies we throw it away - this was added a belt and braces check - just in case Claude had got its model of the game wrong.<\/p>\n\n<p>All the caverns are searched in order, each one starting from the state the previous one finished in.<\/p>\n\n<p>There were bugs in the model. Eugene could walk off the bottom of his shaft, so Willy was dying to a guardian the model didn\u2019t know was there. We also found that pressing fire to start the game was making Willy jump at the start of the first cavern.<\/p>\n\n<p>The full run is now 36,791 frames, about 2,300 fewer than the two pass version, and takes about two hours to find instead of a day. Fifteen of the twenty caverns are faster and the other five are slower by between 2 and 40 frames.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-28\/frames-per-cavern.svg\" alt=\"Frames to finish each cavern with each approach\" \/><\/p>\n\n<p>Moral of the story? Forget all this ML and AI nonsense and get back to studying basic algorithms\u2026<\/p>\n","pubDate":"Mon, 28 Sep 2026 00:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/09\/28\/manic-miner-from-reinforcement-learning-to-search","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/09\/28\/manic-miner-from-reinforcement-learning-to-search.html"},{"title":"Why is Google still serving dodgy ads?","description":"<p>TLDR:<\/p>\n\n<p><em>AI is really good at detecting deceptive adverts - why isn\u2019t Google using it?<\/em><\/p>\n\n<p>A couple of months ago I noticed this advert popping up in the YouTube app. The main reason I noticed it is that I accidentally clicked it - I knew I was running out of space on my iPhone and a minor lapse of concentration caught me out.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-13\/dodgy.webp\" alt=\"Well dodgy\" \/><\/p>\n\n<p>These things can slip through even the best review processes, so I did my internet duty and reported the advert.<\/p>\n\n<p>The response I got back was less than satisfactory:<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-09-13\/hopeless.webp\" alt=\"It's all fine\" \/><\/p>\n\n<p>Again, sometimes things slip through the net and people don\u2019t always check things properly, so I reported it again. And got the same response.<\/p>\n\n<p>In fact, multiple people have reported this advert and received the same:<\/p>\n\n<blockquote>\n  <p><em>We found that the ad doesn\u2019t go against Google\u2019s policies, which prohibit certain content and practices that we believe to be harmful to users and the overall online ecosystem.<\/em><\/p>\n<\/blockquote>\n\n<p>I\u2019m a big fan of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Hanlon's_razor\">Hanlon\u2019s razor<\/a>.<\/p>\n\n<blockquote>\n  <p>Never attribute to malice that which is adequately explained by stupidity<\/p>\n<\/blockquote>\n\n<p>However, if you were being uncharitable, you do have to question whether it\u2019s in Google\u2019s interest to remove adverts that get lots of clicks. After all, these adverts are probably performing well and bringing in lots of lovely \ud83e\udd11.<\/p>\n\n<p>A simpler explanation is that the people reviewing adverts cannot properly review everything so things get missed.<\/p>\n\n<p>You can\u2019t help thinking that AI should come to the rescue here. Given Google has some pretty good models - surely it can put them to use?<\/p>\n\n<p>Here\u2019s what Google\u2019s Gemini has to say about the advert:<\/p>\n\n<hr \/>\n\n<h3 id=\"classification-disapproved\"><strong>Classification: DISAPPROVED<\/strong><\/h3>\n\n<p><strong>Policy Violations:<\/strong><\/p>\n\n<ol>\n  <li><strong>Misrepresentation: Misleading Ad Design<\/strong><\/li>\n  <li><strong>Misrepresentation: Unreliable \/ Deceptive Claims<\/strong><\/li>\n<\/ol>\n\n<h3 id=\"detailed-reasons-for-disapproval\"><strong>Detailed Reasons for Disapproval<\/strong><\/h3>\n\n<h4 id=\"1-mimicking-system-alerts--ui-elements-misleading-ad-design\"><strong>1. Mimicking System Alerts \/ UI Elements (Misleading Ad Design)<\/strong><\/h4>\n\n<ul>\n  <li><strong>The Violation:<\/strong> Google Ads policy strictly prohibits advertisements that imitate operating system dialogs, system warnings, error messages, or interactive system notifications.<\/li>\n  <li><strong>The Evidence:<\/strong> The banner embedded inside the ad explicitly mimics an <strong>iOS system alert modal<\/strong> (\u201ciPhone Storage is Full\u201d) complete with standard iOS typography, container styling, and mock system buttons (\u201cYes\u201d \/ \u201cNo\u201d). This trick visually deceives users into believing their device is throwing a native system-level alert, coercing them to click.<\/li>\n<\/ul>\n\n<h4 id=\"2-non-functional--deceptive-ui-components\"><strong>2. Non-Functional \/ Deceptive UI Components<\/strong><\/h4>\n\n<ul>\n  <li><strong>The Violation:<\/strong> Ads cannot feature non-functional or misleading interactive elements, such as fake dialog options, false close buttons, or radio choices that do not perform their implied system function.<\/li>\n  <li><strong>The Evidence:<\/strong> The \u201cYes\u201d and \u201cNo\u201d options inside the graphic image are static visuals designed to capture clicks anywhere on the ad banner to trigger a store\/landing page redirect, rather than acting as true system controls.<\/li>\n<\/ul>\n\n<h4 id=\"3-deceptive-fear-based-tactics--unverified-claims\"><strong>3. Deceptive Fear-Based Tactics &amp; Unverified Claims<\/strong><\/h4>\n\n<ul>\n  <li><strong>The Violation:<\/strong> Advertising policies forbid using deceptive claims or scare tactics to induce panic and force immediate user action.<\/li>\n  <li><strong>The Evidence:<\/strong> Stating <em>\u201cIf you don\u2019t free up space soon, some features may not work properly\u201d<\/em> inside a fake system popup fabricates a urgent state of failure on the user\u2019s personal device, misleading them about their hardware status to drive app installs.<\/li>\n<\/ul>\n\n<h3 id=\"required-action\"><strong>Required Action<\/strong><\/h3>\n\n<p>Disapprove the ad creative immediately. Issue a policy violation warning\/disapproval flag to the advertiser account under <strong>Misrepresentation (Misleading Ad Design)<\/strong>. Repeated violations of this nature may result in full account suspension for deceptive practices.<\/p>\n\n<hr \/>\n\n<p>Google\u2019s own model rejects the ad in seconds, yet Google\u2019s review process approved it twice.<\/p>\n\n<p>Come on, meatbags - use some of the amazing AI tools you have access to.<\/p>\n","pubDate":"Sun, 13 Sep 2026 00:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/09\/13\/why-is-google-still-serving-dodgy-ads","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/09\/13\/why-is-google-still-serving-dodgy-ads.html"},{"title":"Detecting Claude and ChatGPT using letter counting.","description":"<p><a href=\"\/2026\/08\/18\/detecting-claude-with-letter-counts\">Last time<\/a> I built a detector that counts\nfour-letter runs (n-grams) and tells you whether Claude Opus 5 wrote something. It works well - about 91% on\ntext it has never read.<\/p>\n\n<p>It has one obvious hole: it only knows one robot (Claude Opus 5). Paste ChatGPT output\ninto it and it says \u201cmeatbag\u201d.<\/p>\n\n<p>So I\u2019ve fixed that. I\u2019ve added a ChatGPT detector and you can\n<a href=\"https:\/\/meatbag.atomic14.com\">try it here<\/a>.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-19\/three-readings.webp\" alt=\"Robot or Meatbag? The detector calling a passage &quot;Written by a robot&quot;, with Claude Opus 5 at 1.00 and ChatGPT at 0.34 underneath\" \/><\/p>\n\n<h2 id=\"getting-the-chatgpt-data\">Getting the ChatGPT data<\/h2>\n\n<p>We did the same as last time, have the model rewrite the same 519 human passages, three ways. That\u2019s 1,557\nrewrites, plus 519 passages written from scratch that I keep out of training and use as a test.\n2,076 generations in total.<\/p>\n\n<p>Last time this went through Anthropic\u2019s batch API and cost about $30. This time I just ran the command\nline codex using the subscription I\u2019m already paying. So it didn\u2019t cost anything extra (I\u2019m wishing I\u2019d done\nthat with claude last time!),<\/p>\n\n<p>There is a small issue with this - coodex is a coding agent, so it will have a system prompt that will\ninfluence the output, so our trained up detector might not do as well on text from the ChatGPT app.<\/p>\n\n<h2 id=\"the-chatgpt-detector\">The ChatGPT detector<\/h2>\n\n<p>We built this in exactly the same was as the Claude detector - and it works really well!<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Detector<\/th>\n      <th style=\"text-align: right\">Cross-validated<\/th>\n      <th style=\"text-align: right\">Held-out authors<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Claude Opus 5<\/td>\n      <td style=\"text-align: right\">0.906<\/td>\n      <td style=\"text-align: right\">0.925<\/td>\n    <\/tr>\n    <tr>\n      <td>ChatGPT<\/td>\n      <td style=\"text-align: right\"><strong>0.930<\/strong><\/td>\n      <td style=\"text-align: right\"><strong>0.935<\/strong><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>ChatGPT seems to be easier to detect than Claude. Not by a lot, but consistently.<\/p>\n\n<p>It also seems to handle shorter text better than the Claude detector.<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th style=\"text-align: right\">Letters<\/th>\n      <th style=\"text-align: right\">Claude detector<\/th>\n      <th style=\"text-align: right\">ChatGPT detector<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"text-align: right\">100<\/td>\n      <td style=\"text-align: right\">0.645<\/td>\n      <td style=\"text-align: right\"><strong>0.709<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">200<\/td>\n      <td style=\"text-align: right\">0.740<\/td>\n      <td style=\"text-align: right\"><strong>0.798<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">432<\/td>\n      <td style=\"text-align: right\">0.783<\/td>\n      <td style=\"text-align: right\"><strong>0.885<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">1,000<\/td>\n      <td style=\"text-align: right\">0.858<\/td>\n      <td style=\"text-align: right\"><strong>0.952<\/strong><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>At a thousand letters the ChatGPT detector is on 0.952 against 0.858 for the Claude one, and it\u2019s\nahead on short text as well.<\/p>\n\n<h3 id=\"do-the-two-detectors-work-on-each-other\">Do the two detectors work on each other?<\/h3>\n\n<table>\n  <thead>\n    <tr>\n      <th>Detector<\/th>\n      <th style=\"text-align: right\">Reading its own model<\/th>\n      <th style=\"text-align: right\">Reading the other one<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Claude<\/td>\n      <td style=\"text-align: right\">0.906<\/td>\n      <td style=\"text-align: right\">0.792<\/td>\n    <\/tr>\n    <tr>\n      <td>ChatGPT<\/td>\n      <td style=\"text-align: right\">0.930<\/td>\n      <td style=\"text-align: right\">0.800<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Each one is clearly best on the model it was trained on, but neither is terrible on the other - 0.79\nand 0.80, against 0.5 for a coin toss.<\/p>\n\n<h2 id=\"a-third-detector\">A third detector<\/h2>\n\n<p>Can we build a detector that does Claude or ChatGPT?<\/p>\n\n<p>We trained s third detector from scratch on all the data from both models.<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Detector<\/th>\n      <th style=\"text-align: right\">ROC AUC<\/th>\n      <th style=\"text-align: right\">Held-out authors<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Was this a robot?<\/td>\n      <td style=\"text-align: right\">0.897<\/td>\n      <td style=\"text-align: right\">0.911<\/td>\n    <\/tr>\n    <tr>\n      <td>Does it look like Claude?<\/td>\n      <td style=\"text-align: right\">0.906<\/td>\n      <td style=\"text-align: right\">0.925<\/td>\n    <\/tr>\n    <tr>\n      <td>Does it look like ChatGPT?<\/td>\n      <td style=\"text-align: right\">0.930<\/td>\n      <td style=\"text-align: right\">0.935<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>They\u2019re three separate questions rather than slices of one pie, so they won\u2019t add up to anything. A\npassage can read as 0.85 robot while both model scores sit lower, which just means it looks machine\nwritten without strongly resembling either one.<\/p>\n\n<h2 id=\"what-it-still-cant-do\">What it still can\u2019t do<\/h2>\n\n<p>Everything from last time, plus a couple of new ones.<\/p>\n\n<p>It knows two robots. Gemini, Llama, DeepSeek, anything else - it has never seen them. A low score is\nnot evidence that a person wrote something.<\/p>\n\n<p>It still detects a style rather than a model. The most useful result from last time hasn\u2019t\nchanged: a writing style held out of training scored 0.153, meaning the detector confidently rated it\nas more human than the humans. Both new detectors train on all three instruction styles for that\nreason, but there\u2019s nothing magic about three - we need to add more data.<\/p>\n\n<p>It\u2019s still for education and amusement, and it\u2019s still not evidence. Please continue not accusing\nanyone of anything based on my stupid website.<\/p>\n\n<h2 id=\"try-it-out\">Try it out<\/h2>\n\n<p><a href=\"https:\/\/meatbag.atomic14.com\">meatbag.atomic14.com<\/a> - paste something in and see which robot it\nthinks you are.<\/p>\n","pubDate":"Wed, 19 Aug 2026 00:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/08\/19\/now-it-spots-chatgpt-too","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/08\/19\/now-it-spots-chatgpt-too.html"},{"title":"Detecting Claude by counting letters","description":"<p>On 2 August 2026 Anthropic <a href=\"https:\/\/www.anthropic.com\/news\/claude-text-watermark\">began watermarking<\/a> the text that new Claude models produce - their support pages cover <a href=\"https:\/\/support.claude.com\/en\/articles\/16266773-how-claude-marks-ai-generated-content\">which products are marked<\/a>.<\/p>\n\n<p>The watermark is not a hidden character or a bit of metadata. It is statistical. A secret key nudges the generated output in a way that isn\u2019t obvious to a person, but that can be detected if you have the key. This means that Anthropic can detect it but we common folk cannot.<\/p>\n\n<p>Other providers are doing <a href=\"https:\/\/www.nature.com\/articles\/s41586-024-08025-4\">similar things<\/a>, or will be soon.<\/p>\n\n<p>Can we build our own detector? Given a piece of text, can you tell that a model wrote it?<\/p>\n\n<p>Let\u2019s simplify things and just try one narrow target: text written by Claude Opus 5. Mostly because that\u2019s what I have a subscription to\u2026<\/p>\n\n<p>And - spoiler alert - it turns out you can. I\u2019ve deployed a <a href=\"https:\/\/meatbag.atomic14.com\">web version of it here<\/a>. Generate some text in Claude using Opus 5 and see if it can detect it.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-18\/meatbag.webp\" alt=\"Robot or Meatbag? - the detector calling a pasted passage &quot;Written by a robot&quot;\" \/><\/p>\n\n<p>And yes, if you feed this blog post in, despite me editing it substantially - it\u2019s comes out as written by Claude.<\/p>\n\n<h2 id=\"how-does-it-work\">How does it work?<\/h2>\n\n<p>A long time ago I did a PhD and, as part of that, I looked into <a href=\"https:\/\/en.wikipedia.org\/wiki\/Questioned_document_examination\">questioned document examinations<\/a> - a field that tries to work out who wrote a document. Did Shakespeare write a play, or was it someone else? Which of the Federalists wrote which paper? Who sent these threatening letters?<\/p>\n\n<p>There\u2019s a really nice simple technique that seems to work very well. You can often identify an author by counting short runs of characters. Ignore the words, sentence structure etc\u2026 just the occurrences of runs of letters. These runs are called n-grams.<\/p>\n\n<p>An n-gram is simply a run of n items taken from a sequence. You can build them from words or from characters. Here I\u2019m using characters.<\/p>\n\n<p>Take \u201cthe quick brown fox\u201d. Strip the spaces, the punctuation and the capitals and you have <code class=\"language-plaintext highlighter-rouge\">thequickbrownfox<\/code>. Slide a four-character window along it, one position at a time, and record what you see:<\/p>\n\n<div class=\"language-plaintext highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code>theq  hequ  equi  quic  uick  ickb  ckbr  kbro  brow  rown  ownf  wnfo  nfox\n<\/code><\/pre><\/div><\/div>\n\n<p>Do that to a whole passage and you end up with a table of counts: <code class=\"language-plaintext highlighter-rouge\">that<\/code> appeared 40 times, <code class=\"language-plaintext highlighter-rouge\">ting<\/code> appeared 22 times, <code class=\"language-plaintext highlighter-rouge\">quic<\/code> appeared once, and so on for every run that turned up. Throw the passage away. The table of counts is all the detector ever sees.<\/p>\n\n<p>The counts are normalised so, in theory, the length of the text doesn\u2019t matter. Obviously there is a limit to this - if your text is too short then the counts are not statistically valid and you won\u2019t be able to predict anything.<\/p>\n\n<p>The idea is that the statistical distribution is not something you are aware of as a writer and it\u2019s quite hard to obfuscate. It exposes unconscious tells.<\/p>\n\n<h2 id=\"getting-the-data\">Getting the data<\/h2>\n\n<p>As with any problem of this type, the hard part is getting data, the actual \u201cscience\u201d part is easy.<\/p>\n\n<p>I needed human writing that was definitely human. The safest definition of \u201cdefinitely\u201d is \u201cwritten before ChatGPT existed\u201d, so everything I used was published before 2021. Claude helped me pull it together from three places:<\/p>\n\n<ul>\n  <li><strong>Books<\/strong> from <a href=\"https:\/\/www.gutenberg.org\/\">Project Gutenberg<\/a>, all pre-1929.<\/li>\n  <li><strong>Blog posts<\/strong> from the <a href=\"https:\/\/u.cs.biu.ac.il\/~koppel\/BlogCorpus.htm\">Blog Authorship Corpus<\/a>, written in 2004 or earlier. Non-commercial research use only.<\/li>\n  <li><strong>News articles<\/strong> from <a href=\"https:\/\/huggingface.co\/datasets\/stanford-oval\/ccnews\">CC-News<\/a>, published between 2016 and 2019.<\/li>\n<\/ul>\n\n<p>That gave me 519 passages by 26 authors: 180 from books, 179 from news, 160 from blogs. Three different kinds of writing, and a spread of dates from Victorian to nearly modern.<\/p>\n\n<h2 id=\"generating-the-ai-side\">Generating the AI side<\/h2>\n\n<p>The obvious way to get AI text is to ask Claude to write something.<\/p>\n\n<p>So I asked it to rewrite the human text. For every human passage I asked Claude Opus 5 to produce the same passage again, preserving the meaning, the level of detail and roughly the length. That gives me matched pairs of content. Within a pair the subject is identical, the facts are identical and the length is close, so the only thing left to separate them is the writing itself.<\/p>\n\n<p>Writing style is not one thing, so I asked three different ways:<\/p>\n\n<ul>\n  <li><strong>plain<\/strong> - \u201cRewrite the following passage in clear natural English.\u201d<\/li>\n  <li><strong>direct<\/strong> - \u201cRewrite the following passage in plain, direct modern English.\u201d<\/li>\n  <li><strong>formal<\/strong> - \u201cRewrite the following passage in a formal, precise register.\u201d<\/li>\n<\/ul>\n\n<p>That comes to 1,557 rewrites, generated through the batch API. I also had Claude write fresh passages from scratch on the same topics, which I kept out of all the training and used later as a test.<\/p>\n\n<h2 id=\"does-it-work\">Does it work?<\/h2>\n\n<p>First, how the accuracy is measured. The number below is <a href=\"https:\/\/developers.google.com\/machine-learning\/crash-course\/classification\/roc-and-auc\">ROC AUC<\/a>. Take one human passage and one AI passage at random, score both, and ask whether the AI one got the higher score. ROC AUC is the proportion of random pairs where it did.<\/p>\n\n<p>0.5 is a coin toss. 1.0 means it never gets a pair the wrong way round. It measures ordering, not whether any particular score is correct.<\/p>\n\n<p>Second, the split. Before training anything I set four of the 26 authors aside and did not touch them. Everything else was measured by cross-validation, where the authors used for testing are never the authors used for training. Splitting by author rather than by passage is important. Split by passage and the classifier learns to recognise individual writers, which it is very good at, but it\u2019s not what we want!<\/p>\n\n<p>Then I swept the n-gram length from 1 to 8, holding everything else fixed:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th style=\"text-align: right\">Run length<\/th>\n      <th style=\"text-align: right\">Features<\/th>\n      <th style=\"text-align: right\">ROC AUC<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"text-align: right\">1<\/td>\n      <td style=\"text-align: right\">28<\/td>\n      <td style=\"text-align: right\">0.651<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">2<\/td>\n      <td style=\"text-align: right\">673<\/td>\n      <td style=\"text-align: right\">0.757<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">3<\/td>\n      <td style=\"text-align: right\">8,590<\/td>\n      <td style=\"text-align: right\">0.857<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">4<\/td>\n      <td style=\"text-align: right\">60,211<\/td>\n      <td style=\"text-align: right\">0.906<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">5<\/td>\n      <td style=\"text-align: right\">214,949<\/td>\n      <td style=\"text-align: right\"><strong>0.912<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">6<\/td>\n      <td style=\"text-align: right\">444,691<\/td>\n      <td style=\"text-align: right\">0.907<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">7<\/td>\n      <td style=\"text-align: right\">668,979<\/td>\n      <td style=\"text-align: right\">0.890<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">8<\/td>\n      <td style=\"text-align: right\">843,596<\/td>\n      <td style=\"text-align: right\">0.863<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Some surprising results.<\/p>\n\n<p>Counting individual letters works! 28 features, just the letter frequencies, reach 0.651. That is not much, but it is well clear of a coin toss, from a really simple feature set.<\/p>\n\n<p>Accuracy climbs steeply to 4, peaks at 5, and then falls away. Longer runs carry more information, right up until there is too little data to support them. This may hint that using word counts would work quite well too - but maybe that would require more data? Something to research\u2026<\/p>\n\n<p>I also tried spaced n-grams, where you take every second or every third character instead of consecutive ones. This didn\u2019t work at all - it made the accuracy much worse.<\/p>\n\n<h2 id=\"i-ended-up-picking-4-instead-of-5\">I ended up picking 4 instead of 5<\/h2>\n\n<p>The peak is at 5. But I decided to use 4, and there are a couple of reasons for this:<\/p>\n\n<p>The first reason is that going to 5 letters gives a marginal improvement in accuracy at the cost of a lot more features.<\/p>\n\n<p>The second is that it only gives an improvement on long passages of text. The reason is how thinly the data spreads. There are 26\u2074 = 457,000 possible 4-grams and 26\u2075 = 11.9 million possible 5-grams.<\/p>\n\n<p>If you take a typical passage from my corpus, with a length of 2,259 letters:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th style=\"text-align: right\">Run length<\/th>\n      <th style=\"text-align: right\">Distinct runs found<\/th>\n      <th style=\"text-align: right\">Appearing exactly once<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"text-align: right\">3<\/td>\n      <td style=\"text-align: right\">1,215<\/td>\n      <td style=\"text-align: right\">63%<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">4<\/td>\n      <td style=\"text-align: right\">1,750<\/td>\n      <td style=\"text-align: right\">81%<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">5<\/td>\n      <td style=\"text-align: right\">1,991<\/td>\n      <td style=\"text-align: right\">89%<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>At 5 characters, nearly nine in ten of the runs in a passage appear only once and it gets worse as the text gets shorter: at 200 letters, 90% of 3-grams and 97% of 5-grams appear only once.<\/p>\n\n<p>Here is the same detector built at each length, tested on 320 passages Claude wrote from prompts in a public benchmark against their 320 human source documents, with the text truncated to various lengths:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th style=\"text-align: right\">Letters<\/th>\n      <th style=\"text-align: right\">2<\/th>\n      <th style=\"text-align: right\">3<\/th>\n      <th style=\"text-align: right\">4<\/th>\n      <th style=\"text-align: right\">5<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td style=\"text-align: right\">100<\/td>\n      <td style=\"text-align: right\">0.559<\/td>\n      <td style=\"text-align: right\">0.603<\/td>\n      <td style=\"text-align: right\"><strong>0.645<\/strong><\/td>\n      <td style=\"text-align: right\">0.630<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">200<\/td>\n      <td style=\"text-align: right\">0.632<\/td>\n      <td style=\"text-align: right\">0.682<\/td>\n      <td style=\"text-align: right\"><strong>0.740<\/strong><\/td>\n      <td style=\"text-align: right\">0.732<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">432<\/td>\n      <td style=\"text-align: right\">0.679<\/td>\n      <td style=\"text-align: right\">0.754<\/td>\n      <td style=\"text-align: right\"><strong>0.783<\/strong><\/td>\n      <td style=\"text-align: right\">0.773<\/td>\n    <\/tr>\n    <tr>\n      <td style=\"text-align: right\">1,000<\/td>\n      <td style=\"text-align: right\">0.719<\/td>\n      <td style=\"text-align: right\">0.827<\/td>\n      <td style=\"text-align: right\"><strong>0.867<\/strong><\/td>\n      <td style=\"text-align: right\">0.866<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>The 4-grams win at every length.<\/p>\n\n<h2 id=\"the-final-detector\">The final detector<\/h2>\n\n<p>The finished thing is not complicated:<\/p>\n\n<ol>\n  <li>Take the text. Strip everything that is not a letter (including any spaces), and lowercase what remains.<\/li>\n  <li>Count all the 4-grams. Each passage becomes a list of 60,211 numbers.<\/li>\n  <li>Normalise, so the numbers are proportions and independent of passage length.<\/li>\n  <li>Feed it to a linear support vector machine, which learns which counts run higher in Claude\u2019s writing.<\/li>\n  <li>Convert the result to a number between 0 and 1, where higher means more like Claude.<\/li>\n<\/ol>\n\n<p>The n-gram counting and the classifier are both stock <a href=\"https:\/\/scikit-learn.org\/\">scikit-learn<\/a> components.<\/p>\n\n<p>Because of step 1 it cannot see punctuation, sentence length, paragraph structure, capitalisation or any individual word. Because of step 3 it cannot see how long the passage is. It sees letter proportions and nothing else.<\/p>\n\n<h2 id=\"testing-it\">Testing it<\/h2>\n\n<p>The four authors set aside at the beginning were scored once, at the end:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Test<\/th>\n      <th style=\"text-align: right\">ROC AUC<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>The four authors not in the training set<\/td>\n      <td style=\"text-align: right\">0.925<\/td>\n    <\/tr>\n    <tr>\n      <td>Cross-validation, authors held out each round<\/td>\n      <td style=\"text-align: right\">0.906<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>The two numbers are close, which is the thing I most wanted to see. It means the classifier was not quietly learning to recognise particular authors.<\/p>\n\n<p>Then I pointed it at text with no connection to the training data at all. First, 175 posts from my own blog written between 2006 and 2022, against eight passages written by Claude:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Group<\/th>\n      <th style=\"text-align: right\">Passages<\/th>\n      <th style=\"text-align: right\">Median score<\/th>\n      <th style=\"text-align: right\">Above 0.8<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Human<\/td>\n      <td style=\"text-align: right\">175<\/td>\n      <td style=\"text-align: right\">0.09<\/td>\n      <td style=\"text-align: right\">2%<\/td>\n    <\/tr>\n    <tr>\n      <td>Claude Opus 5<\/td>\n      <td style=\"text-align: right\">8<\/td>\n      <td style=\"text-align: right\">0.85<\/td>\n      <td style=\"text-align: right\">63%<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Not bad!<\/p>\n\n<p>Second, a harder test. <a href=\"https:\/\/aclanthology.org\/2024.acl-long.674\/\">RAID<\/a> is a public benchmark for machine-generated text detection, containing <a href=\"https:\/\/huggingface.co\/datasets\/liamdugan\/raid\">six million passages<\/a> from 11 generators across eight subject domains. I took 320 of its prompts, had Claude Opus 5 answer them, and scored those answers against the 320 human source documents the prompts came from. Different corpus, and a different task, because these were written from scratch rather than rewritten. It scores 0.889.<\/p>\n\n<p>And the fresh passages I held out of training entirely, written from scratch on the four unseen authors\u2019 topics, score 0.977.<\/p>\n\n<p>So: counting four-letter sequences, with no understanding of the text whatsoever, separates human writing from Claude\u2019s rewriting of that same writing about 93% of the time on authors it has never read. I did not expect it to work that well.<\/p>\n\n<h2 id=\"what-is-it-actually-picking-up\">What is it actually picking up?<\/h2>\n\n<p>The model is simple enough that we can see what it\u2019s doing (well, I can get Claude to do it anyway).<\/p>\n\n<p>Here are the strongest features on each side for the <code class=\"language-plaintext highlighter-rouge\">plain<\/code> rewrites, at 3 characters so they are short enough to read:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Pushes towards Claude<\/th>\n      <th>Pushes towards human<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td><code class=\"language-plaintext highlighter-rouge\">ing<\/code> <code class=\"language-plaintext highlighter-rouge\">tha<\/code> <code class=\"language-plaintext highlighter-rouge\">hat<\/code> <code class=\"language-plaintext highlighter-rouge\">one<\/code> <code class=\"language-plaintext highlighter-rouge\">Ive<\/code><\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">hic<\/code> <code class=\"language-plaintext highlighter-rouge\">ich<\/code> <code class=\"language-plaintext highlighter-rouge\">Iam<\/code> <code class=\"language-plaintext highlighter-rouge\">not<\/code> <code class=\"language-plaintext highlighter-rouge\">but<\/code><\/td>\n    <\/tr>\n    <tr>\n      <td><code class=\"language-plaintext highlighter-rouge\">ugh<\/code> <code class=\"language-plaintext highlighter-rouge\">oug<\/code> <code class=\"language-plaintext highlighter-rouge\">ver<\/code> <code class=\"language-plaintext highlighter-rouge\">ely<\/code> <code class=\"language-plaintext highlighter-rouge\">rou<\/code><\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">whi<\/code> <code class=\"language-plaintext highlighter-rouge\">wil<\/code> <code class=\"language-plaintext highlighter-rouge\">was<\/code> <code class=\"language-plaintext highlighter-rouge\">ill<\/code> <code class=\"language-plaintext highlighter-rouge\">Iwi<\/code><\/td>\n    <\/tr>\n    <tr>\n      <td><code class=\"language-plaintext highlighter-rouge\">ong<\/code> <code class=\"language-plaintext highlighter-rouge\">out<\/code> <code class=\"language-plaintext highlighter-rouge\">hin<\/code> <code class=\"language-plaintext highlighter-rouge\">ple<\/code> <code class=\"language-plaintext highlighter-rouge\">tly<\/code><\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">ion<\/code> <code class=\"language-plaintext highlighter-rouge\">ati<\/code> <code class=\"language-plaintext highlighter-rouge\">tio<\/code> <code class=\"language-plaintext highlighter-rouge\">enc<\/code> <code class=\"language-plaintext highlighter-rouge\">con<\/code><\/td>\n    <\/tr>\n    <tr>\n      <td><code class=\"language-plaintext highlighter-rouge\">gth<\/code> <code class=\"language-plaintext highlighter-rouge\">ctl<\/code> <code class=\"language-plaintext highlighter-rouge\">set<\/code> <code class=\"language-plaintext highlighter-rouge\">ine<\/code> <code class=\"language-plaintext highlighter-rouge\">eth<\/code><\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">fth<\/code> <code class=\"language-plaintext highlighter-rouge\">oft<\/code> <code class=\"language-plaintext highlighter-rouge\">ofa<\/code> <code class=\"language-plaintext highlighter-rouge\">hav<\/code> <code class=\"language-plaintext highlighter-rouge\">dby<\/code><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>They are fragments, not words, but you can read them. On the Claude side: <code class=\"language-plaintext highlighter-rouge\">-ing<\/code> endings, <code class=\"language-plaintext highlighter-rouge\">-ly<\/code> adverbs (<code class=\"language-plaintext highlighter-rouge\">ely<\/code>, <code class=\"language-plaintext highlighter-rouge\">tly<\/code>, <code class=\"language-plaintext highlighter-rouge\">ctl<\/code> for \u201centirely\u201d, \u201cdirectly\u201d, \u201cexactly\u201d), \u201cthat\u201d, \u201cthough\u201d and \u201cthrough\u201d, and <code class=\"language-plaintext highlighter-rouge\">Ive<\/code>, the contraction \u201cI\u2019ve\u201d with the apostrophe stripped out.<\/p>\n\n<p>On the human side: \u201cwhich\u201d, \u201cnot\u201d, \u201cbut\u201d, \u201cwill\u201d, \u201cwas\u201d, the <code class=\"language-plaintext highlighter-rouge\">-tion<\/code> and <code class=\"language-plaintext highlighter-rouge\">-ation<\/code> noun endings (<code class=\"language-plaintext highlighter-rouge\">ion<\/code>, <code class=\"language-plaintext highlighter-rouge\">ati<\/code>, <code class=\"language-plaintext highlighter-rouge\">tio<\/code>), \u201cof the\u201d and \u201cof a\u201d (<code class=\"language-plaintext highlighter-rouge\">fth<\/code>, <code class=\"language-plaintext highlighter-rouge\">oft<\/code>, <code class=\"language-plaintext highlighter-rouge\">ofa<\/code>), and <code class=\"language-plaintext highlighter-rouge\">Iam<\/code> and <code class=\"language-plaintext highlighter-rouge\">Iwi<\/code>, which are \u201cI am\u201d and \u201cI will\u201d written out in full.<\/p>\n\n<p>Looking at individual letters is even more interesting when we compare each AI passage against the specific human passage it was rewritten from. Any difference inside a pair is a difference in writing, not in subject or era.<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Instruction<\/th>\n      <th>Letters more common in Claude\u2019s version<\/th>\n      <th>Letters less common<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>plain<\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">g<\/code> <code class=\"language-plaintext highlighter-rouge\">h<\/code> <code class=\"language-plaintext highlighter-rouge\">l<\/code> <code class=\"language-plaintext highlighter-rouge\">r<\/code> <code class=\"language-plaintext highlighter-rouge\">n<\/code> <code class=\"language-plaintext highlighter-rouge\">y<\/code><\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">i<\/code> <code class=\"language-plaintext highlighter-rouge\">s<\/code> <code class=\"language-plaintext highlighter-rouge\">o<\/code> <code class=\"language-plaintext highlighter-rouge\">f<\/code> <code class=\"language-plaintext highlighter-rouge\">m<\/code> <code class=\"language-plaintext highlighter-rouge\">c<\/code><\/td>\n    <\/tr>\n    <tr>\n      <td>direct<\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">g<\/code> <code class=\"language-plaintext highlighter-rouge\">h<\/code> <code class=\"language-plaintext highlighter-rouge\">w<\/code> <code class=\"language-plaintext highlighter-rouge\">k<\/code> <code class=\"language-plaintext highlighter-rouge\">l<\/code> <code class=\"language-plaintext highlighter-rouge\">y<\/code><\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">i<\/code> <code class=\"language-plaintext highlighter-rouge\">c<\/code> <code class=\"language-plaintext highlighter-rouge\">f<\/code> <code class=\"language-plaintext highlighter-rouge\">e<\/code> <code class=\"language-plaintext highlighter-rouge\">s<\/code> <code class=\"language-plaintext highlighter-rouge\">m<\/code><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>According to Claude, the pattern is recognisable. <code class=\"language-plaintext highlighter-rouge\">i<\/code>, <code class=\"language-plaintext highlighter-rouge\">c<\/code>, <code class=\"language-plaintext highlighter-rouge\">f<\/code>, <code class=\"language-plaintext highlighter-rouge\">s<\/code> and <code class=\"language-plaintext highlighter-rouge\">m<\/code> are the letters of words English borrowed from Latin and French: \u201cconsideration\u201d, \u201csignificance\u201d, \u201cspecific\u201d. <code class=\"language-plaintext highlighter-rouge\">g<\/code>, <code class=\"language-plaintext highlighter-rouge\">h<\/code>, <code class=\"language-plaintext highlighter-rouge\">w<\/code>, <code class=\"language-plaintext highlighter-rouge\">k<\/code> and <code class=\"language-plaintext highlighter-rouge\">y<\/code> are the letters of the older Germanic core: \u201cthink\u201d, \u201cthough\u201d, \u201cwork\u201d, \u201cknow\u201d, \u201chigh\u201d. Claude is moving the vocabulary from one to the other.<\/p>\n\n<p>Checking at the word level confirms it. Words with Latin endings drop in both, and in the <code class=\"language-plaintext highlighter-rouge\">plain<\/code> rewrites the mean word length barely moves, so the shift is which words Claude chose rather than how long they were.<\/p>\n\n<p>I guess this is what: \u201cclear natural English\u201d, \u201cplain, direct modern English\u201d means.<\/p>\n\n<p>Now the third instruction, the one asking for \u201ca formal, precise register\u201d:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Instruction<\/th>\n      <th>Letters more common in Claude\u2019s version<\/th>\n      <th>Letters less common<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>formal<\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">c<\/code> <code class=\"language-plaintext highlighter-rouge\">e<\/code> <code class=\"language-plaintext highlighter-rouge\">r<\/code> <code class=\"language-plaintext highlighter-rouge\">i<\/code> <code class=\"language-plaintext highlighter-rouge\">n<\/code> <code class=\"language-plaintext highlighter-rouge\">p<\/code><\/td>\n      <td><code class=\"language-plaintext highlighter-rouge\">h<\/code> <code class=\"language-plaintext highlighter-rouge\">w<\/code> <code class=\"language-plaintext highlighter-rouge\">k<\/code> <code class=\"language-plaintext highlighter-rouge\">l<\/code> <code class=\"language-plaintext highlighter-rouge\">o<\/code> <code class=\"language-plaintext highlighter-rouge\">g<\/code><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Every letter has swapped sides. At the word level it is not subtle: Latin endings go <strong>up<\/strong> and mean word length also goes up.<\/p>\n\n<h2 id=\"how-generalised-is-it\">How generalised is it?<\/h2>\n\n<p>We built the detector twice. Once on all three instructions, which is the version described above, and once on the plain and direct rewrites only, leaving the formal ones out. Everything else is identical.<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>Tested on<\/th>\n      <th style=\"text-align: right\">Trained on plain + direct<\/th>\n      <th style=\"text-align: right\">Trained on all three<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>plain rewrites<\/td>\n      <td style=\"text-align: right\">0.827<\/td>\n      <td style=\"text-align: right\"><strong>0.899<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>direct rewrites<\/td>\n      <td style=\"text-align: right\">0.879<\/td>\n      <td style=\"text-align: right\"><strong>0.900<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>formal rewrites<\/td>\n      <td style=\"text-align: right\"><strong>0.153<\/strong><\/td>\n      <td style=\"text-align: right\"><strong>0.977<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>fresh writing, in neither training set<\/td>\n      <td style=\"text-align: right\">0.881<\/td>\n      <td style=\"text-align: right\"><strong>0.977<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>RAID passages, outside the corpus<\/td>\n      <td style=\"text-align: right\">0.794<\/td>\n      <td style=\"text-align: right\"><strong>0.889<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>my blog, 8 AI passages<\/td>\n      <td style=\"text-align: right\"><strong>0.986<\/strong><\/td>\n      <td style=\"text-align: right\">0.981<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>A detector that never saw the formal rewrites cannot detect them. It scores 0.153, which means it reliably rates them as <strong>more human-looking than the actual human writing beside them<\/strong>. It is not confused and it is not broken. It learned \u201ctext that got plainer is AI\u201d, it was handed text that got more formal, and it answered accordingly.<\/p>\n\n<p><strong>Fresh writing goes from 0.881 to 0.977, and it is in neither training set.<\/strong> Passages Claude wrote from scratch, with no original to follow. Adding a third writing style did not just teach the model a third writing style - it generalised to a fourth condition it had never seen.<\/p>\n\n<p><strong>The same happens outside the corpus<\/strong>, where RAID goes from 0.794 to 0.889.<\/p>\n\n<p>Adding more styles would probably help to make the detector even more general.<\/p>\n\n<p>Unfortunately it also indicates that you can cheat the detector by using a style it has not bene trained on.<\/p>\n\n<h2 id=\"try-it-out\">Try it out<\/h2>\n\n<p>The whole thing runs <a href=\"https:\/\/meatbag.atomic14.com\">in a browser<\/a>, and the text never leaves your machine.<\/p>\n","pubDate":"Tue, 18 Aug 2026 00:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/08\/18\/detecting-claude-with-letter-counts","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/08\/18\/detecting-claude-with-letter-counts.html"},{"title":"Don't blame Claude - It's me, I'm the problem, it's me...","description":"<p>F\u2019you, Claude, you are driving me absolutely bananas:<\/p>\n\n<blockquote>\n  <p>The house convention is a short phrase naming the defect, and the archive is full of it: \u201cA citation that names nothing\u201d, \u201cThe safe zone that only the spawner obeys\u201d, \u201cOne word that means five things\u201d. I matched that convention.<\/p>\n<\/blockquote>\n\n<p><a href=\"\/2026\/08\/15\/output-style-does-nothing\">We agreed<\/a> that you should use <a href=\"https:\/\/en.wikipedia.org\/wiki\/Simplified_Technical_English\">ASD-STE100<\/a> - Simplified Technical English. Why are you still producing this nonsense!<\/p>\n\n<p>What do you mean your weird text is \u201cthe house convention\u201d? <code class=\"language-plaintext highlighter-rouge\">CLAUDE.md<\/code> says to use ASD-STE100, the output style says to use ASD-STE100 - arrrrgh!<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-17\/rage-work.webp\" alt=\"Man in a cubicle beating a keyboard against his monitor\" \/><\/p>\n\n<p>Take a deep breath. And repeat to yourself: \u201cIt\u2019s not Claude\u2019s fault\u201d. Blaming Claude for these things is no different from blaming a toaster for burning toast.<\/p>\n\n<p>So, what\u2019s going on? Why is Claude driving me nuts? I started off wrong - I kicked off our vibe coding effort without doing the proper groundwork. Over <a href=\"https:\/\/github.com\/atomic14\/harmless\/graphs\/commit-activity\">700 commits in<\/a>, I decided that I couldn\u2019t stand how Claude communicated and asked it to switch to ASD-STE100. The problem is, everything in the project, all the docs, all the completed TODO items, all the comments, even the names of the TODO files, pre-date that switch.<\/p>\n\n<p>Everything Claude looks at after it\u2019s read CLAUDE.md undermines what I\u2019m asking it to do. \u201cThe house convention\u201d is indeed the opposite of what I\u2019m telling Claude to do.<\/p>\n\n<p>Trying to correct course after creating a lot of code and documentation is like trying to turn a massive tanker - we\u2019ve got way too much momentum. It\u2019s going to be a slow correction and it\u2019s going to take me constantly pushing on the tiller to make it happen.<\/p>\n\n<p>Time to roll up my sleeves and help Claude. My <a href=\"https:\/\/github.com\/atomic14\/harmless\">vibe-coded Elite clone<\/a> is going to need both of us.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-15\/harmless.webp\" alt=\"Three pirates at Orerve, condition red - the combat computer earning its keep\" \/><\/p>\n","pubDate":"Sun, 16 Aug 2026 12:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/08\/16\/its-me-hi-im-the-problem","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/08\/16\/its-me-hi-im-the-problem.html"},{"title":"Forget the Robot Tax. Tax the Tokens.","description":"<p>I read a paper this week called <a href=\"https:\/\/papers.ssrn.com\/sol3\/papers.cfm?abstract_id=6448898\">The AI Layoff Trap<\/a>. It has an interesting thesis.<\/p>\n\n<p>If you look at what is happening with automation and laying people off, and take it to the ultimate conclusion, no one will have a job. If that happens no one can afford to pay for a company\u2019s goods or services. So, logically, it doesn\u2019t make sense for a company to automate all the jobs and lay everyone off. If they do that, they have no customers.<\/p>\n\n<p>The paper argues that even if it doesn\u2019t make sense, businesses have no choice but to do it. Automate and lay everyone off - and have no customers.<\/p>\n\n<p>When a company automates work and replaces people with AI, it keeps all of the savings. The laid off people have less money to spend, but not all companies are moving at the same speed, so there are still employed people who can spend money. The loss of demand from the people laid off is spread over all the companies providing the services.<\/p>\n\n<p>This leads to an arms race. Everyone agrees that mass layoffs will eventually hurt them, but nobody wants to be the one company that holds off whilst its competitors get cheaper.<\/p>\n\n<p>The paper suggests a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pigouvian_tax\">Pigouvian tax<\/a> on automation - charge companies for the cost they\u2019re pushing onto everyone else when they swap human labour for machines.<\/p>\n\n<p>I think there\u2019s a big problem with that - how do you measure automation?<\/p>\n\n<p>Say a company employs 10,000 people one year and 8,000 the next.<\/p>\n\n<p>How many of those 2,000 jobs went because of AI?<\/p>\n\n<p>The company will tell you it was restructuring. Or outsourcing. Or natural attrition. Or a soft market, or a merger, or just a bit of belated efficiency improvement - the old \u201cwe overhired and now we\u2019re just correcting\u201d.<\/p>\n\n<p>And things are never simple in business - nobody sits down and decides to make 2,000 people redundant for one clean, well-documented reason. There\u2019s a whole bunch of horse trading and carve outs that makes it almost impossible to know the real reason.<\/p>\n\n<p>Working out which specific jobs were \u201clost to AI\u201d turns into an accounting exercise, then a lobbying exercise, and finally a legal one. The elegant tax starts to look impossible to actually collect.<\/p>\n\n<p>Here\u2019s the alternative: don\u2019t tax the job losses, tax the AI.<\/p>\n\n<p>A very small levy on inference - tokens consumed, or more sensibly the compute needed to produce them - collected from the model providers and the big compute platforms. Nobody has to audit anybody\u2019s HR decisions.<\/p>\n\n<p>It\u2019s a blunt instrument. A company using AI to make its existing staff more productive pays the tax without laying off a single person. So do researchers, startups, and people doing things nobody has thought of yet.<\/p>\n\n<p>You lose precision and you gain something you can actually measure.<\/p>\n\n<p>The rate doesn\u2019t need to be big either. The point isn\u2019t to make AI expensive enough to stop automation happening - the productivity is real, and trying to hold it back would be both futile and a bit daft. Think of it as a small levy on something that\u2019s quietly becoming a factor of production alongside land, labour and capital.<\/p>\n\n<p>The paper\u2019s model has a nice property: the problem shrinks when displaced workers get more of their income back. Retraining, wage insurance, actually finding people new jobs - all of it reduces the hole in demand that automation creates.<\/p>\n\n<p>So the loop looks like this:<\/p>\n\n<blockquote>\n  <p>AI usage \u2192 small compute tax \u2192 worker transition fund \u2192 more income replacement \u2192 less demand destruction<\/p>\n<\/blockquote>\n\n<p>The tax never has to work out which API call replaced which person. It just skims a little off the top of the activity that\u2019s driving the transition and puts it towards helping people through it.<\/p>\n\n<p>What are the problems? And there are plenty of them\u2026<\/p>\n\n<p>Open-source models and self-hosted inference are awkward to collect from. Offshore compute is an obvious escape hatch. And deciding what actually counts as taxable AI compute would keep a room full of lawyers busy for a good while.<\/p>\n\n<p>None of that is trivial. But it feels more tractable than asking a tax inspector to rule on whether a particular redundancy was caused by AI.<\/p>\n\n<p>A token tax would be theoretically wrong in all sorts of ways. But a slightly wrong tax on something you can measure is probably better than a theoretically perfect tax on something you can\u2019t.<\/p>\n\n<p>What do you think? Let me know in the comments.<\/p>\n","pubDate":"Sun, 16 Aug 2026 00:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/08\/16\/forget-the-robot-tax-tax-the-tokens","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/08\/16\/forget-the-robot-tax-tax-the-tokens.html"},{"title":"The Output Style, It Does Nothing! - Learning to live with Claude","description":"<p><img src=\"\/assets\/article_images\/2026-08-15\/the-goggles.webp\" alt=\"My eyes! The output style does nothing!\" \/><\/p>\n\n<p>Here\u2019s a response Claude came up with recently. I was asking it to review some of the code it had been writing for my <a href=\"https:\/\/github.com\/atomic14\/harmless\">\u201cOpen Vibe Code\u201d Elite clone<\/a> - you can <a href=\"https:\/\/harmless.atomic14.com\">play it here in your browser<\/a>, it\u2019s surprisingly good.<\/p>\n\n<blockquote>\n  <p>\u201cTwenty-seven echoes; most are two halves of a seam stated from each side, which is correct. Four are true duplicates. Checking two of them:\u201d<\/p>\n<\/blockquote>\n\n<p>There\u2019s a lot of this kind of output coming out of Claude. The internet is full of people complaining. Sometimes reading what Claude says is very much like being stuck at the bar with the world\u2019s most boring know-it-all. Lots of clever phrases and convoluted sentences - but ultimately vacuous and empty.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-15\/boring.webp\" alt=\"Being cornered in the pub by someone describing their seams\" \/><\/p>\n\n<p>What\u2019s really interesting, though, is that the code and docs it generates are pretty good (at least the tests are green, the game plays well etc\u2026). It\u2019s just the communication with me that\u2019s the problem.<\/p>\n\n<p>A popular recommended remedy for this is to change the output style:<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-15\/output-style.webp\" alt=\"The output style picker in Claude Code, with ASD-STE100 added as a custom style\" \/><\/p>\n\n<p>Some people suggest using <a href=\"https:\/\/en.wikipedia.org\/wiki\/Simplified_Technical_English\">ASD-STE100<\/a> - Simplified Technical English. The theory is that this should force Claude into communicating with you in a sensible way.<\/p>\n\n<p>There\u2019s a bit of controversy over whether you change the output style or you just add it to <code class=\"language-plaintext highlighter-rouge\">CLAUDE.md<\/code>, but whichever you choose, the result is supposed to be substantially better.<\/p>\n\n<p>Does it work?<\/p>\n\n<p>At first, absolutely. It feels better - easier to read, shorter sentences, fewer random, weird analogies.<\/p>\n\n<p>But I think that feeling of it being better is an illusion. You think it\u2019s better because it\u2019s different. It\u2019s just a relief to your brain not having to parse Claude\u2019s madness. But after a while you get used to the change and slowly start to realise that the prose is just as vacuous and empty as before.<\/p>\n\n<p>And the real kicker\u2026 the quote at the top of the page was produced <em>after<\/em> I\u2019d changed the output style and added it to my <code class=\"language-plaintext highlighter-rouge\">CLAUDE.md<\/code>\u2026<\/p>\n\n<p>The big question is: Does it matter? And I suspect, probably not.<\/p>\n\n<p>I\u2019m starting to think of Claude\u2019s ramblings in the same way as the \u201cThinking\u2026\u201d content - it\u2019s not necessarily meant for me to read. The actual output that matters is the working code. And to get quality there you need programmatic constraints and constant adversarial review.<\/p>\n\n<p>It\u2019s time to make peace with Claude\u2019s nonsense. Stop reading the prose and judge things purely by the produced artefacts - once you do that, the quality of the commentary stops mattering.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-15\/shakespear.webp\" alt=\"It's not Shakespeare, but it's a pretty decent sonnet about bananas\" \/><\/p>\n\n<p>So judge the artefact rather than the commentary. This is what all that vacuous prose actually built:<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-15\/harmless.webp\" alt=\"Three pirates at Orerve, condition red - the combat computer earning its keep\" \/><\/p>\n\n<p><a href=\"https:\/\/harmless.atomic14.com\">Harmless is playable in your browser<\/a> - no install, nothing to sign up to, just open it and fly - and the <a href=\"https:\/\/github.com\/atomic14\/harmless\">source is on GitHub<\/a> if you want to see how it\u2019s put together. Let me know how you get on in the comments.<\/p>\n\n","pubDate":"Sat, 15 Aug 2026 00:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/08\/15\/output-style-does-nothing","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/08\/15\/output-style-does-nothing.html"},{"title":"Rescuing my 2006 Travel Blog","description":"<p>In November 2006 I put everything I owned in my parents\u2019 loft, had a great many\ninjections, and flew to Guatemala. I came back thirteen months later having\ncrossed fourteen countries between Antigua and Tierra del Fuego, and I\u2019d written\nthe whole thing up as it happened \u2014 182 posts typed into internet caf\u00e9s, hostel\nlobbies and the occasional boat.<\/p>\n\n<p>That blog is still at <a href=\"https:\/\/travellingchris.blogspot.com\">travellingchris.blogspot.com<\/a>. Most of the photos are still on\nFlickr. Both the blogging service and Flickr still work, but Flickr is now a paid service with limits.\nAnd Blogspot is now blogger (or is it the other way round?). Flickr has\nchanged hands three times and now charges for more than 1000 photos.<\/p>\n\n<p>So I took exports from both and fed them into Claude: \u201cRebuild my old blog as a static site - here\u2019s the blog export and here\u2019s a bunch of photos\u201d. And this is what I now have:\n<a href=\"https:\/\/travellingchris.atomic14.com\/\">travellingchris.atomic14.com<\/a>.<\/p>\n\n<p><a href=\"https:\/\/travellingchris.atomic14.com\/\"><img src=\"\/assets\/article_images\/2026-08-10\/before-after.webp\" alt=\"The old Blogspot template beside the rebuilt archive\" \/><\/a><\/p>\n\n<p>The tech itself is pretty boring \u2014 Astro, static HTML, photos on Cloudflare\nR2 - it should run for next to nothing. There were some interesting things along\nthe way.<\/p>\n\n<h2 id=\"two-archives-to-reconcile-and-fix\">Two archives to reconcile and fix<\/h2>\n\n<p>Google Takeout gave me an Atom feed with 942 entries in it: 182 posts, 203 real\ncomments, and 557 spam comments accumulated over the last couple of decades. Flickr\ngave me back my 2,819 photos with some JSON metadata.<\/p>\n\n<p>The two kind of match up, although I didn\u2019t start uploading to Flickr until half\nway through the trip.<\/p>\n\n<ul>\n  <li><strong>Flickr<\/strong> covers April 2007 onwards \u2014 South America \u2014 with capture dates and some tags.<\/li>\n  <li><strong>The Blog photos<\/strong> covers November 2006 to March 2007 \u2014 Central America.\nSadly, for that half of the trip, that\u2019s all I have. And they are quite low resolution. I\u2019m hoping somewhere I have a backup - but I haven\u2019t found it yet.<\/li>\n<\/ul>\n\n<h2 id=\"missing-photos\">Missing photos<\/h2>\n\n<p>Tracking down the photos for every posts was a bit of a mission. In all\nthere are 182 posts with 778 images in them.<\/p>\n\n<p>Some of these turned out to be photos hotlinked from other places. These are pretty much gone forever.<\/p>\n\n<p>Some of the earliest posts reference <code class=\"language-plaintext highlighter-rouge\">photos1.blogger.com<\/code>, the image host Blogger used in 2006. Google\nTakeout didn\u2019t include those files. But the host is still up and serving files\nnineteen years on. Claude wrote a script and pulled thirteen\nphotographs back out of it - so those photos are saved! Though again, quite low resolution.<\/p>\n\n<h2 id=\"dodgy-html\">Dodgy HTML<\/h2>\n\n<p>A fair number of the posts were broken in various ways - for example we\u2019ve got\nthings like this:<\/p>\n\n<div class=\"language-html highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nt\">&lt;img<\/span> <span class=\"na\">src=<\/span><span class=\"s\">\"http:\/\/farm3.static.flickr.com\/2229\/1518290776_54f431e902.jpg?v=0&lt;br \/&gt;\n<\/span><\/code><\/pre><\/div><\/div>\n\n<p>Claude is pretty good at this kind of things though and fell back to just finding\nthings that looked like URLs.<\/p>\n\n<p>After all this, we managed to get 766 photos out of the 778 image references. That\u2019s not\nbad for something that\u2019s been rotting away for 19 years.<\/p>\n\n<h2 id=\"fixing-the-overlap\">Fixing the overlap<\/h2>\n\n<p>The two archives overlap between April and June 2007, when I sometimes uploaded the\nsame photo on the blog and on Flickr. Those images were then resized by each service\nand have different filename - so we end up with dupiclates.<\/p>\n\n<p>Claude\u2019s initial attempt to fix this was a bit naive and didn\u2019t work well.<\/p>\n\n<p>The problem is, the collection is full of similar pictures. Waterfalls and ancient ruins\ncan look almost like each other and there\u2019s quite a few \u201cburst\u201d shots. Here are three pairs my first pass\nhappily merged:<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-10\/burst-frames.webp\" alt=\"Burst frames that are not duplicates\" \/><\/p>\n\n<p>So Claude tried something else: cosine similarity between\nmean-subtracted 32\u00d732 greyscale thumbnails. 1,024 dimensions instead of 64 bits,\nand blind to brightness and contrast. The numbers separate beautifully on this\ncollection:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>\u00a0<\/th>\n      <th>score<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Burst frames (must <strong>not<\/strong> merge)<\/td>\n      <td>\u2264 0.9793<\/td>\n    <\/tr>\n    <tr>\n      <td>Genuine re-encodes (must merge)<\/td>\n      <td>\u2265 0.9993<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>That worked pretty well and we didn\u2019t lose any photos.<\/p>\n\n<h2 id=\"all-the-dates-are-wrong\">All the dates are wrong<\/h2>\n\n<p>None of the 2,819 Flickr photos has a geotag. These were all taken before\ngood mobile cameras were ubiquitus and I took them on all on a normal camera.<\/p>\n\n<p>There is no location data anywhere in either export.<\/p>\n\n<p>But there are 25,000 words of me saying where I was.<\/p>\n\n<p>So the locations come from the writing. Each post is matched against a the places it mentions - including all my misspellings (my spelling is attrocious).<\/p>\n\n<p>Photos actually embedded in a post are easy - every post has some kind of location\ninfomation in it. A photo in the Machu Picchu post is Machu Picchu, and it\u2019s dated 1 September 2007.\nThat gives Claude 762 dated anchors scattered across the year. Using that, every remaining\nphotograph can be approximately placed by interpolating its own date against them.<\/p>\n\n<p><a href=\"https:\/\/travellingchris.atomic14.com\/map\/\"><img src=\"\/assets\/article_images\/2026-08-10\/route-map.webp\" alt=\"The route map\" \/><\/a><\/p>\n\n<p>Two things Claude got wrong first time:<\/p>\n\n<p><strong>Post dates are not photo dates.<\/strong> I blogged from internet caf\u00e9s days after the\nfact. \u201cBack from the wilderness\u201d was published a week after the photos in it were\ntaken. Using publish dates as location anchors put a whole trek in the wrong\nplace. A post\u2019s own date has to only be used when it has no dated photos for it.<\/p>\n\n<p><strong>Upload dates are not capture dates.<\/strong> The Blogger images have no EXIF\ncapture date, so we fell back to upload time \u2014 and a set of beach photos from\nMexico got placed in New York, because that\u2019s where I was when I uploaded them\ntwo days later. Photos published in a post need to take the post\u2019s location directly\nrather than going via the date timeline.<\/p>\n\n<p>Every photograph carries a <a href=\"https:\/\/travellingchris.atomic14.com\/about\/\">confidence level<\/a>: 762 certain,\n2,220 confident, 119 inferred. It could be better, but it\u2019s good enough. And I\u2019m not\ngoing to hand curate 2000+ photos\u2026<\/p>\n\n<h2 id=\"there-are-a-lot-of-beaches---all-called-beachjpg\">There are a lot of beaches - all called beach.jpg\u2026<\/h2>\n\n<p>This one I spotted after Claude has finished - haven\u2019t I seen that beach already on a previous post?<\/p>\n\n<p>In 2007 I uploaded a photo, called it <code class=\"language-plaintext highlighter-rouge\">beach.jpg<\/code>, and posted it. Three weeks\nlater I did exactly the same thing. Seven times over seven weeks.<\/p>\n\n<p>Google Takeout disambiguates the <em>files<\/em> \u2014 <code class=\"language-plaintext highlighter-rouge\">beach.jpg<\/code>, <code class=\"language-plaintext highlighter-rouge\">beach(1).jpg<\/code>, through\n<code class=\"language-plaintext highlighter-rouge\">beach(6).jpg<\/code> \u2014 but the URL inside each post carries only the original name. So\nif you resolve photos by filename, as Claude did, all seven posts get the same\nphotograph and the other six are orphaned. Thirty-four filenames in the album\ncollide this way.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-10\/seven-beaches.webp\" alt=\"Seven different photographs, all uploaded as beach.jpg\" \/><\/p>\n\n<p>Each photo needed to include its upload date to disambiguate it.<\/p>\n\n<p>There were a couple of other issues like this, including two photos called <code class=\"language-plaintext highlighter-rouge\">garden.jpg<\/code>.\nMy london flat did not have a tropical garden\u2026<\/p>\n\n<p>Fixing both took the number of distinct photographs actually visible in posts\nfrom 723 to 762.<\/p>\n\n<h2 id=\"more-photos\">More photos!<\/h2>\n\n<p>I fond another stash of photos on a CD-ROM I\u2019d burned as backup in June 2007. These\nwere all original photos straight off the camera\u2019s SDCard 3072x2304 and covered\nApril and May. I\u2019m pretty sure that somewhere there\u2019s a nother CD with more photos.\nBut these ones covered Ecuador and the Gal\u00e1pagos.<\/p>\n\n<p>The obvious question: are these already in the archive, or are they new? By hand\nthat\u2019s 145 photos to match up against 3,073, which is not happening. But Claude had already built a\nmatching tool so it was pretty easy to check.<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>\u00a0<\/th>\n      <th>\u00a0<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Matched something in the archive<\/td>\n      <td>127 photos, all scoring \u2265 0.995<\/td>\n    <\/tr>\n    <tr>\n      <td>Closest non-match<\/td>\n      <td>0.7537<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>All the 127 matches were photographs that had been uploaded to Flickr as a 1600px copy - and one of them\nthat had survived only as a 640px thumbnail. The remaining 18 were never uploaded anywhere.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-10\/resolution-gain.webp\" alt=\"The same frame from the Flickr copy and the CD-ROM original\" \/><\/p>\n\n<h2 id=\"even-more-photos\">Even more photos<\/h2>\n\n<p>I thought I\u2019d lost all the Death Road photos \u2014 mountain biking down the Yungas Road. They\u2019d been \nhotlinked from the tour company\u2019s Flickr account, which no longer exists.<\/p>\n\n<p>But - some of the photos were on the backup CD-ROM! So there is some record of my madness.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-10\/death-road.webp\" alt=\"The Death Road, from the tour company's own CD\" \/><\/p>\n\n<p>They don\u2019t quite match up to the original photos I\u2019d put in the blog, so Claude decided that we\nshould be honest and put a note in their place:<\/p>\n\n<blockquote>\n  <p>A photograph stood here. It was hotlinked from an account that no longer\nexists, and is in neither export. Other photographs from these days did\nsurvive \u2014 18 of them are in the gallery.<\/p>\n<\/blockquote>\n\n<h2 id=\"267-photographs-with-strange-orientations\">267 photographs with strange orientations<\/h2>\n\n<p>Some frames in the archive are rotated 90 degrees.<\/p>\n\n<p>Claudes first attempt was a simple \u201cfind the sky and check it is at the top.\u201d<\/p>\n\n<blockquote>\n  <p>Take a strip off each of the four edges, score each strip for brightness and blueness, and\nthe winning edge should be the top. When it is decisively the left or the right,\nthe frame is on its side.<\/p>\n<\/blockquote>\n\n<p>This didn\u2019t work very well:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>\u00a0<\/th>\n      <th>\u00a0<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Upright photographs wrongly flagged<\/td>\n      <td>4%<\/td>\n    <\/tr>\n    <tr>\n      <td>Turned photographs caught<\/td>\n      <td>38%<\/td>\n    <\/tr>\n    <tr>\n      <td>\u2026and turned back the right way<\/td>\n      <td><strong>97%<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>No verdict at all<\/td>\n      <td>802 photographs<\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Claude tried a bunch of other things: <strong>upright scenes carry\nmore horizontal structure than vertical<\/strong> \u2014 horizons, walls, tables, waterlines\n\u2014 so a 90 degree turn should swap the balance of edge gradients. It is cited\neverywhere.<\/p>\n\n<p>On this collection: 56% accuracy overall, we\u2019d have been better off tossing a coin.<\/p>\n\n<h3 id=\"using-some-proper-machine-learning\">Using some proper machine learning<\/h3>\n\n<p>After a bit of googling, I found this model: <a href=\"https:\/\/pypi.org\/project\/check-orientation\/\">check-orientation<\/a>,\na ResNeXt-50 trained on four rotations. Way better results:<\/p>\n\n<table>\n  <thead>\n    <tr>\n      <th>\u00a0<\/th>\n      <th>heuristic<\/th>\n      <th>model<\/th>\n    <\/tr>\n  <\/thead>\n  <tbody>\n    <tr>\n      <td>Flagged<\/td>\n      <td>163<\/td>\n      <td><strong>267<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Finds 180\u00b0 flips<\/td>\n      <td>no<\/td>\n      <td><strong>yes<\/strong> (8 of them)<\/td>\n    <\/tr>\n    <tr>\n      <td>Works indoors, at night<\/td>\n      <td>no<\/td>\n      <td><strong>yes<\/strong><\/td>\n    <\/tr>\n    <tr>\n      <td>Abstains on<\/td>\n      <td>802<\/td>\n      <td><strong>none<\/strong><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n\n<p>Claude checked the results by looking at the flagged images and every one of the 162\nphotographs it found was genuinely on its side. It runs on Apple Silicon in about a\nminute for the whole archive.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-10\/orientation.webp\" alt=\"Photographs as the archive stored them, and after correction\" \/><\/p>\n\n<p><strong>267 photographs, 8.6% of the archive, were lying on their side.<\/strong> Four of the\nsix above are cases the simple sky heuristic could never have caught.<\/p>\n\n<h2 id=\"these-photos-are-rubbish\">These photos are rubbish\u2026<\/h2>\n\n<p>Next step was to actually do some QA on the site and the first thing I noticed\nwas that there were several places where images were needed to \u201crepresent\u201d something:\na country, a period of the trip etc.., and the simple \u201ctake the first picture in the set\u201d\napproach didn\u2019t reallty work.<\/p>\n\n<p>Peru, with 1,612 photographs, was represented by a picture of a passport stamp.\nInteresting, but not exactly a \u201chero\u201d shot.<\/p>\n\n<p><img src=\"\/assets\/article_images\/2026-08-10\/cover-choice.webp\" alt=\"The first photograph of a country, and the best one\" \/><\/p>\n\n<h2 id=\"what-it-costs-to-run\">What it costs to run.<\/h2>\n\n<p>The whole thing is static HTML on Cloudflare Pages with 2 GB of photos in R2.<\/p>\n\n<p>It should cost pennies to serve.<\/p>\n\n<p>Will it still be live in 19 years time? Maybe I\u2019ll be writing another blog post with whatever the latest AI is\nabout how I rescued my old travelling posts\u2026<\/p>\n\n<h2 id=\"who-did-all-the-work\">Who did all the work?<\/h2>\n\n<p>Claude, obviously. The current crop of LLMs seem to excel at this kind of static site generation and data extraction. My only input was a few idea and a bit of helpful googling.<\/p>\n\n<p>What a time to be alive!<\/p>\n","pubDate":"Mon, 03 Aug 2026 12:00:00 +0000","link":"https:\/\/www.atomic14.com\/2026\/08\/03\/rescuing-a-2006-travel-blog","comment":{},"guid":"https:\/\/www.atomic14.com\/2026\/08\/03\/rescuing-a-2006-travel-blog.html"}]}}