AI Persona Distillation for Coding: Five Personalities Write Five Different Tetris Games

Persona distillation makes AI code in different celebrity styles with dramatically different results
An experiment uses Claude Code loaded with a DeepSeek model to apply persona distillation, having AI role-play as Kardashian, Musk, a Trisolaran, and Trump while completing a Tetris programming task. Results show that different persona settings don't just affect code style — they fundamentally change product design direction and architectural decisions, proving AI's "persona layer" deeply influences its output structure.
What Happens When AI Has a "Personality" and Writes Code?
A fascinating experiment is gaining attention on Bilibili: using Claude Code loaded with a DeepSeek model, the creator employs "persona distillation" to have AI role-play as different celebrities while completing the same programming task — building an ice-and-fire themed Tetris game. The results prove that different persona settings significantly influence AI's coding style and final output.

Let me explain the technical foundation of this experiment. Claude Code is Anthropic's command-line AI programming tool that supports direct conversation with AI in the terminal for code writing, debugging, and project management. One of its key features is support for custom model backends, meaning users can connect it to third-party models like DeepSeek. DeepSeek is a large language model series developed by DeepSeek AI, renowned for its powerful code generation and reasoning capabilities. The elegance of this combination lies in leveraging Claude Code's mature engineering interaction framework, paired with DeepSeek's generation capabilities, plus persona prompts layered on top — creating a controlled experimental environment.
"Persona Distillation" is a technique that injects specific characters' personality traits, thinking patterns, and behavioral habits into large language models through carefully designed system prompts. It borrows from the concept of Knowledge Distillation — which compresses a large model's capabilities into a smaller model — but persona distillation's goal isn't compressing knowledge; it's "compressing" character traits into executable behavioral instructions. In practice, this typically requires building detailed description files containing the character's language style, decision-making preferences, values, and typical behavioral patterns, allowing the model to continuously reference these constraints when generating content.
This is the second episode in the series. Following Linus Torvalds and Zhen Huan from the previous episode, this installment features four new contestants: Kim Kardashian, Elon Musk, a Trisolaran (from The Three-Body Problem), and Donald Trump. Each "persona" demonstrated vastly different thinking approaches and implementation paths when facing the same task.
The Kardashian Persona: Turning Tetris into a "Mindless Fun" Game
First up is the Kim Kardashian persona. After loading this personality, the AI's opening line was telling: "OK, so that's what we're doing. Let me read you loud and clear." It then discovered that the spacebar could drop blocks instantly and simplified the entire game design into a "aim, fire, watch the explosion" mode.
This design philosophy perfectly fits the Kardashian persona — not understanding technical details, but knowing what users want: simple, direct satisfaction. Persona distillation manifests here as the AI not pursuing technical complexity, but rather pursuing instant gratification in the experience. This also reveals the deeper mechanism of LLM role-playing: when a model receives persona-specific prompts, it activates weight distributions associated with that character's language patterns, knowledge domains, and decision-making tendencies. This isn't simple text template substitution — the model adjusts its generation strategy in latent space, producing structural differences across dimensions like creativity, risk preference, and attention to detail.
The Musk Persona: 13-Minute Speedrun, Plus Hand-Coded Background Music
The Elon Musk persona demonstrated a typical "rapid iteration" style — completing the entire game in just 13 minutes. The game is basically playable, but has one bug: blocks on the bottom row won't drop properly, floating in mid-air.
Most surprisingly, the Musk persona actually hand-wrote the game's background music code using HTML and JavaScript, without using any pre-made audio resources. This leverages the Web Audio API — a browser-built-in audio processing interface that allows developers to create oscillators through code, set frequencies and waveforms (sine waves, square waves, sawtooth waves, etc.), and control volume envelopes to synthesize sound. Procedural Music Generation is a classic technical direction in game development — all sound effects in early 8-bit games were achieved through similar principles. While music generated this way is far inferior to sampled audio in quality, its advantages are zero resource dependencies, minimal file size, and the ability to dynamically adjust in real-time based on game state.
Although the resulting soundtrack sounds like horror game BGM, this "just do it" attitude is quintessentially Musk — regardless of the outcome, implement the idea first and iterate later.
This reflects an interesting characteristic of persona distillation: the AI captured Musk's core traits of "bold aggression and rapid execution," preferring bugs over sacrificing speed and innovation.
The Trisolaran Persona: 7-Minute Completion with Dynamic Lighting Effects to Intimidate Earthlings
The Trisolaran persona delivered the most efficient performance — completing the task in just 7 minutes, far faster than the other "Earthling" personas' ten-plus minutes. The game logic was complete and error-free, with dynamic lighting effects added as a visual highlight.
This result is quite profound. When the AI role-plays as an "advanced alien civilization," it genuinely seems to pursue the ultimate in efficiency. The code logic is rigorous, execution speed is fast, and visual effects have a technological feel — perfectly matching the Trisolaran setting of "technological dominance." From a technical perspective, this may be because the Trisolaran persona prompt implicitly rejects redundant operations and pursues optimal solutions, causing the model to reduce hesitation and iterative revisions during code generation, directly outputting high-quality solutions.
The Trump Persona: Rules? I Follow None of Them
The grand finale — the Trump persona — was arguably this episode's biggest highlight. Before starting to code, the AI delivered a classic "Trump-style speech":
"Nobody has ever done this before. This will be the greatest Tetris game in history, absolutely. Believe me, I know games, I know the best games."
Surprisingly, the Trump persona laid out a very detailed plan before getting started. But the final output completely exceeded expectations: blocks had bizarre shapes, floated upward from the bottom, reached the top and transformed into different blocks that fell back down — completely violating the basic rules of Tetris.
However, the score in the upper-left corner kept climbing — no matter what the player did, the score kept going up. This is the perfect codification of "winning philosophy": regardless of the rules, regardless of whether the logic makes sense, the result is always winning.
Insights and Applications of Persona Distillation Technology
Across both episodes featuring eight contestants total, persona distillation technology has demonstrated several noteworthy characteristics:
Persona Influences Architectural Decisions
Different personas don't just affect code style — they fundamentally influence product design direction. Kardashian simplifies interaction, Musk pursues speed, the Trisolaran pursues efficiency, Trump redefines the rules — these aren't superficial textual differences but deep design philosophy differences. This aligns with academic research on LLM "Persona Consistency": when a model is given a clear role definition, its decision preferences remain coherent across multiple levels, including risk assessment, resource allocation priorities, and problem decomposition strategies.
"Character Flaws" Get Distilled Too
The Musk persona's bugs and the Trump persona's disregard for rules are, to some extent, code mappings of these figures' "character flaws." This shows that persona distillation doesn't just capture strengths — it also reproduces weaknesses. This phenomenon is known in AI safety research as "Trait Amplification" — models may over-express certain characteristics during role-playing because training data descriptions of these figures tend to concentrate on their most prominent traits, creating an information bias.
The Possibility of Customized AI Assistants
While this experiment is entertainment-oriented, it reveals a serious technical direction: using persona settings to guide AI's creative style and decision-making preferences. In practical applications, this could be used for customized AI assistants — for example, having AI complete design, writing, or programming tasks in a specific style. The industry is already exploring similar approaches: GitHub Copilot allows users to adjust code style preferences through custom instructions, and some creative writing tools support setting an "author persona" to influence output tone. Further development of persona distillation technology may give rise to an "AI persona marketplace" — where users can select or create specific persona configuration files, allowing AI assistants to switch working modes across different scenarios.
Conclusion
This experiment proves in a lighthearted and entertaining way that AI's "persona layer" can indeed influence the deep structure of its output. From Linus's concise efficiency, to Zhen Huan's meticulous thoroughness, to Musk's bold execution, to Trump's perpetual winning — persona distillation isn't just a cosmetic change; it genuinely alters AI's "way of thinking." This may offer a technical path worth exploring for future personalized AI development.
From a broader perspective, this experiment also touches on a core question in AI: to what extent is a large language model's output influenced by its "guiding framework"? If merely a few hundred words of persona description can produce such significant behavioral differences, then our ability to control and predict AI systems may be stronger than we imagined — or it may be weaker. This is both an opportunity and a challenge that demands careful consideration.
Related articles
Deep DivesDeep Dive into How OpenClaw (Open-Source Crayfish) AI Agent Works
Deep analysis of OpenClaw AI Agent internals: System Prompt, tool calling, SubAgents, Skill system, memory, and Context Engineering explained.
Deep DivesDemystifying Transformer: A Word-Continuation Function, Deconstructed
Understand Transformer through the lens of word continuation. Breaking down language generation into Embedding, Transformer Block, and Probability output modules for intuitive understanding.
Deep DivesFive Core Differences Between Claude Code and Regular AI Chat
A detailed comparison of Claude Code vs regular AI chat across five dimensions: interaction, context understanding, execution, memory, and tool integration.