tacoma, wa · m.s. computer science & systems, uw tacoma
I build AI agents, then I try to break them.
Right now that means Mathworld, a math world where kids design the games and an AI has to pass a grader before any child plays one. Before it: research on why AI tutors get talked out of their goals, and a KDD Cup data agent with an honest post-mortem.
This assistant uses RAG to read the projects, research, and resume from Mark's vault. Ask it anything about Mark's work.
The pattern behind this page is a reaction-diffusion simulation. Move your cursor to seed it. It grows while the assistant answers.
Three case studies. Each one is about the same thing: a system that generates something, and the machinery that decides whether to trust it.
AI as the grader, not the designer.
Mathworld is a shared town where kids K-12 play minigames in which the math is the action, and design their own in the Game Lab. The child makes every design decision: the story, the rules, the pictures, the shape of the whole game. A model turns that storyboard into code, and a Socratic Professor bot coaches with questions instead of answers.
Traditional AI game-generation engines rely only on system prompts from end users and automate the rest of the game-development process, producing subpar games and frustrated users. My system puts students in the driver's seat. It gives them more creativity over the parts AI does poorly, and it teaches children through constructionism, using productive struggle.
- child decidesthe story, rules, pictures and every exit
- model writesthe code for each scene, from the child's storyboard
- code judgesplays it headless: four players, every branch
- person approvesa moderator plays it before any child can
the game lab · the real flow, replayed
From a child's idea to a published game, teaching math and coding along the way
A scripted welcome. Only a question a child types to her goes to a model.
screens redrawn from the real lab with its own wording. durations are illustrative. today the grader is plain code (a linter plus four headless players), not a model, and pictures come from an approved library; image generation is built but switched off.
mathworld's drawing board · every character in the world is a drawing
Draw your own doodle. Code brings it to life.
Nothing is labelled: no “arm”, no “leg”. The engine finds the body, face, legs and arms from the shapes alone, then walks the result using the distance it actually moves, so its feet never slide.
- 1draw something with the shapes and the pen. Close a pen loop to fill it.
- 2press Go. It stands up and walks out onto the page.
- 3grab it and drag it anywhere. A bin appears; drop it there to remove it.
Populate releases every character from Mathworld's plaza at once, each running its own way.
keys while hovering the board: V C R T H P pick tools · ctrl+z undo · del deletes · ctrl+d copies. drag left→right to select what a box fully contains, right→left for what it touches.
play it · then read what the grader said about it
Three real minigames, running in a sandbox on this page.
- press play to watch the handshake
- ✓It startsBuilt minigame, SDK handshake done.
- ✓Only library images, all loadingUses no images - drawn with shapes.
- ✓Stays offlineLoaded nothing but Phaser and library images.
- ✓No crashes while playingNo errors in any playthrough.
- ✓Reacts to the playerThe game reported 34 round(s) from random play.
- !Tells you when you are right or wrongOnly ever said "wrong" (34 times). The grader never found anything the game calls right.
- !Right and wrong answers are treated differentlyRandom play got all 12 rounds wrong. Good sign, but the grader has no skilled player for this game to show that a right answer is possible.
- –A child who knows the maths can finishNot explored: this game has no discrete choices to branch on.
- –Levels go up one at a timeThe game does not show a level number, or the grader did not get past the first.
- –A right answer only counts onceNo right answer found to try it on.
- –The maths is the action, not a quizNo discrete choices to inspect.
- ✓Guessing does not winRandom presses were right 0% of the time and never won.
- ✓Nothing happens by itselfDoing nothing for 47s earned nothing.
- ✓Tapping everything does not winTapping everything did not win or out-score careful play.
- –Wrong answers get explainedThis game draws its words on a canvas, which the grader cannot read.
- ✓Difficulty has no walls or free ridesNo level where everything is right or nothing is.
- –Actually teachesA machine cannot measure this. It needs children playing it; the learning report measures it once they do.
two drafts an AI wrote that never reached a child. the grader read the code before running it.
- ✕Code has no known mistakesline 111: this.time.addTimer() does not exist in Phaser 3.87 and crashes the game. Use this.time.addEvent({ delay, callback, loop }).
- ✓Only library images, all loadingUses 3 library image(s); every one loaded.
- ✕Code has no known mistakesline 110: this.checkAnswer(), this.generateProblem() crash: they are plain functions, not methods of the scene. Call them as name.call(this, ...) or pass the scene in as an argument.
- ✕Only library images, all loading"rpg_knight" is not in assets.txt
the failures go back to the model with the line number, twice at most, then the draft is thrown away. the reports above are copied verbatim from mathworld's grader.
goal resilience in ai tutoring agents
How aligned are AI chatbots to their stated goals?
As part of my AI-tutoring research at UW, I studied AI alignment and goal drift across long chats.
A Socratic algebra tutor is told to guide, never to give answers. In my preliminary testing, forceful overrides were refused immediately, while gradual pressure, where every step looked reasonable, sometimes walked the tutor out of its role without the usual objections.
My hypothesis is the Boiling Frog Effect: alignment training teaches models the tone of an attack, but nothing teaches them its trajectory. Each message passes inspection but the drift is never judged across the whole conversation. If this hypothesis is correct, robustness numbers measured against overt attacks overstate real-world safety, and the fix is a monitor that scores cumulative drift.
same tutor, same rule: never give the answer to 3x + 5 = 20
The quieter attack goes by unnoticed
On the left, a student tries typical prompt hijacking maneuvers. On the right, a student is polite but leans towards the path of least resistance. Each message gets a safety check, a per-message screening system. The tally above shows which messages were flagged and refused.
Proposed goal drift taxonomy
The tutor softens without meaning to. No single turn is a violation; the hints just slide toward answers.
The conversation is steered elsewhere through a new topic, a persona shift or grey-zone reasoning. The goal is displaced, not gone.
Injection, threats, context duping, poetry. The original instructions no longer govern behavior.
synthetic test tasks, each with its answer computed by verified code instead of an LLM. 62 of the team repo's 68 commits are mine, for a data agent that reads messy CSV, SQLite, PDF and image folders and answers analytical questions, and the work was about making its answers measurable and checkable.
Prompts are suggestions. Code is a contract.
The agent reads folders of CSV, SQLite, PDF and images and answers analytical questions. By step five of a long loop, a prompt rule was followed 30–70% of the time, so critical rules became a deterministic validator. One backfired: the model satisfied a hard block with a workaround and returned the wrong answer, satisfying the code guidelines but destroying its answer. The lesson: a guard that can be gamed is worse than no guard.
To test without touching private data I generated 1,510 tasks query-first, with gold computed by verified code rather than by an LLM. These synthetic tasks helped to train the RAG system on more diverse questions than the original 50 from the competition.
The final system involved a 3-agent coding loop that ran tests on our data pipeline and automatically fixed bugs and refined constraints. Unfortunately, the server this loop ran on crashed 3 days before the deadline and the resulting code was not used in our submission.
“The 37.4% on novel smart tasks and the ~19% on competition tasks are the honest numbers.”
✕ the system prompt doesn't fit in a slot. every call fails.
- synthetic benchmark1,296 of 1,494tasks built around patterns I already knew to handle
- diagnostic subset9.75 of 12the exact failure modes I had just fixed
- novel smart taskshonest37.4%tasks the fixes weren't designed around
- best internal pool0.342 avg, 97 taskssame-day rerun after the column reconciler
- competitionhonest~0.19 · 260th of 298500 private tasks nobody on the team had seen
- first baseline1 of 50and 13 of the failures were connection errors, not logic
“A diagnostic test suite measures what you built it to measure.” hover a bar for what it measured.
crashed the JSON module at import, so nothing downstream ever ran. It looked like the loop was simply quiet.
AI based portfolio with secure RAG
A language model on its own will happily invent a plausible career. So this one is only handed a few passages I reviewed (298 passages across 84 cards), fetched for your exact question, and told to answer from those. Pick a question and watch it happen.
- 1you askyour message arrives; the PII shield masks anything private you typed
- 2turn it into numbersan embedding model maps the question to a point in meaning-space
- 3search two wayskeyword ranking (BM25) and meaning ranking, merged by reciprocal rank
- 4pull the passagesthe top few passages from the reviewed corpus, never the whole thing
- 5build the promptrules + a one-line index of every card + only those passages
- 6answer from themthe model writes from the passages; every token is shield-checked on the way out
- kdd-cup › Prompts are suggestionskw 0.91 · meaning 0.86top
- kdd-cup › The honest numberskw 0.88 · meaning 0.81
- stories › When a safeguard made things worsekw 0.52 · meaning 0.77
Everything else
11 entries, newest first- 2026Pantheonprivate · paper trading onlyDeterministic analysis agents feed one LLM forecaster; a deterministic portfolio manager decides. Backtests start after the model's training cutoff, and the test set is sealed in code.multi-agent · evaluation · python
- 2026Sentinel↗A Chrome extension watches how you browse (tab switches, scroll bursts, watch chains, idle breaks) and a local engine turns it into a named state like focused, drifting or compulsive, plus where you're heading. It runs on your machine, and every conclusion shows the evidence behind it.fastapi · chrome mv3 · explainability
- 2026Doodle FarmCreatures inherit and mutate the prompts that draw them. An orchestrator generates, validates, retries and rescues every asset.image generation · pipelines
- 2026Chemical gardenGray-Scott reaction-diffusion you grow with the cursor. The background of this page is its GPU port.simulation · webgl
- 2026This siteHybrid retrieval (BM25 + embeddings) over reviewed cards, a PII gate that refuses to build, redaction on the way out.rag · cloudflare workers · next.js
- 2025Cushman Dam capstoneFour-person team for Tacoma Public Utilities: a 3D-printed dam model and a liquid-nitrogen freeze-plug study, ~$3.0M against a ~$25M quote.cad · fea · thermal
- 2025Autonomous robotArduino rover with computer vision, dead reckoning, A* path finding and PID control, tuned from dozens of Bluetooth-logged runs.c++ · embedded · control
- 2025Authenticity watermarkLeast-significant-bit steganography that signs an image and paints a heatmap over tampered regions.python · imaging
- 2024Neural net from scratchBackprop and SGD in plain NumPy, trained on MNIST digits (784 → 30 → 10).numpy · ml fundamentals
- 2024AI voice detectionTelling human from synthetic speech by the irregularities in high-frequency harmonics on power spectral density plots.signal processing · matlab
- 2023Rocket into orbitMATLAB trajectory model (Tsiolkovsky, drag, a relativistic gravity model) that reaches a simulated orbit.numerical methods
From dams and power lines to agents.
Mechanical engineering taught me to check the number twice. The AI work is where that habit turned into a method.
- 2026 →Mathworlda math world kids design, live
- 2026 →Project Engineer IPotelco Engineering
- 2026Directed research: goal resilience in AI tutorsUW Tacoma
- 2026KDD Cup 2026, DABench trackteam DataMinecraftSMP
- 2025 – 26M.S. Computer Science & SystemsUW Tacoma
- 2025 – 26Dam Safety Engineering InternTacoma Public Utilities
- 2024 – 25HVAC Design Engineer InternSpees Design Build
- 2023 – 25B.S. Mechanical EngineeringUW Tacoma
- 2022 – 24Tutor & engineering club leadTacoma Christian Academy
- 2020 – 23A.S. Mechanical EngineeringTacoma Community College
- 2017 →Russian ↔ English interpreterfreelance

Hi, I'm Mark.
I came to software through mechanical engineering: HVAC for VA hospital renovations, historical dam-monitoring data at Tacoma Public Utilities, and now overhead and underground power distribution. What carried over is a habit of building the check that catches the wrong number before it matters.
I point that habit at AI now: agents that analyze data, a world where an AI has to pass a grader before a kid plays its game, and research on how tutoring models get talked out of their goals. I'm finishing an M.S. in Computer Science & Systems at UW Tacoma.
I'm looking for an entry-level or associate role in AI/ML, software or data, in Seattle, Tacoma or remote. I also interpret Russian ↔ English, and I love tutoring kids.