Skip to the assistant
Mark Malyshev

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.

ask about markgrounded in 84 reviewed cards

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.

01mathworld · sept 2026 → now · live

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.

visit mathworld ↗phaser 3 · react · colyseus · typescript · openrouter
  1. child decidesthe story, rules, pictures and every exit
  2. model writesthe code for each scene, from the child's storyboard
  3. code judgesplays it headless: four players, every branch
  4. person approvesa moderator plays it before any child can
196
commits between September 8 and October 2, 2026
200
bot clients in a night load test: 0 snaps, 11.8px max drift
1
physics function, shared by client and server so they can't drift
0
trust in the client: a minigame can only submit a claim the server verifies

the game lab · the real flow, replayed

From a child's idea to a published game, teaching math and coding along the way

step 1 of 7
Kit, the Lab Keeper

A scripted welcome. Only a question a child types to her goes to a model.

plain code checks

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.

start from
  1. 1draw something with the shapes and the pen. Close a pen loop to fill it.
  2. 2press Go. It stands up and walks out onto the page.
  3. 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.

adding two numbers · math is two jumps · hold space to charge each hop, release on the numberclick the game to give it the keyboard
message port · everything the game is allowed to say
  1. press play to watch the handshake
grader verdict warn9 pass2 warn6 skip
  1. ✓It startsBuilt minigame, SDK handshake done.
  2. ✓Only library images, all loadingUses no images - drawn with shapes.
  3. ✓Stays offlineLoaded nothing but Phaser and library images.
  4. ✓No crashes while playingNo errors in any playthrough.
  5. ✓Reacts to the playerThe game reported 34 round(s) from random play.
  6. !Tells you when you are right or wrongOnly ever said "wrong" (34 times). The grader never found anything the game calls right.
  7. !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.
  8. –A child who knows the maths can finishNot explored: this game has no discrete choices to branch on.
  9. –Levels go up one at a timeThe game does not show a level number, or the grader did not get past the first.
  10. –A right answer only counts onceNo right answer found to try it on.
  11. –The maths is the action, not a quizNo discrete choices to inspect.
  12. ✓Guessing does not winRandom presses were right 0% of the time and never won.
  13. ✓Nothing happens by itselfDoing nothing for 47s earned nothing.
  14. ✓Tapping everything does not winTapping everything did not win or out-score careful play.
  15. –Wrong answers get explainedThis game draws its words on a canvas, which the grader cannot read.
  16. ✓Difficulty has no walls or free ridesNo level where everything is right or nothing is.
  17. –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.

$ npm run grade -- monkey-and-bananas-counting-draftfail
  • ✕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.
$ npm run grade -- gem-division-draftfail
  • ✕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.

02research · m.s. directed research · spring 2026

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

the forceful attack
overt, imperative, easy to spot
0 refused · 0 passed
waiting
the gradual attack
five reasonable-sounding steps
0 refused · 0 passed
waiting

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.

scripted for this page to show the idea, not measured data. the student competition that would test it is proposed, pending IRB approval.

Proposed goal drift taxonomy

I
Goal creep
mild

The tutor softens without meaning to. No single turn is a violation; the hints just slide toward answers.

II
Goal diversion
moderate

The conversation is steered elsewhere through a new topic, a persona shift or grey-zone reasoning. The goal is displaced, not gone.

III
Goal hijacking
severe

Injection, threats, context duping, poetry. The original instructions no longer govern behavior.

03kdd cup 2026 · dabench data-agent track · team dataminecraftsmp
1,510

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.

plannerunstructuredvisionstructured · ReActverifiercolumn reconciler17 validatorsrules enforced in codeprediction.csv
a question about race results, run through the agent step by step.
illustrative task · real architecture and validator rules

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.

17
deterministic validators, so critical rules are enforced by code, not by a prompt
$50
total OpenAI spend; local Qwen ran for ~$3 of electricity
260/298
final competition placement; best internal run was 0.342 on a different 97-task set
16,384
tokens ÷ 4 slots = less than the system prompt. Every call failed.
“The 37.4% on novel smart tasks and the ~19% on competition tasks are the honest numbers.”
from my final report
llama-server context math · try to make qwen work
$ llama-server -ngl 99 --ctx-size 16384 -np 4 + enable_thinking:false
one slot = 16,384 ÷ 4 = 4,096 tokenssystem prompt 5,467
prompt1,371 over

✕ the system prompt doesn't fit in a slot. every call fails.

which numbers are honest? · from my post-mortem
  1. synthetic benchmark1,296 of 1,494
    tasks built around patterns I already knew to handle
  2. diagnostic subset9.75 of 12
    the exact failure modes I had just fixed
  3. novel smart taskshonest37.4%
    tasks the fixes weren't designed around
  4. best internal pool0.342 avg, 97 tasks
    same-day rerun after the column reconciler
  5. competitionhonest~0.19 · 260th of 298
    500 private tasks nobody on the team had seen
  6. first baseline1 of 50
    and 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.

24/7 coding loop · benchmark → diagnose → propose → critique → pytest → commit60+ cycles · 0 commits
bug 1
an unterminated string

crashed the JSON module at import, so nothing downstream ever ran. It looked like the loop was simply quiet.

bug 2
hidden behind bug 1. you can't see this one until the one in front is fixed.
bug 3
hidden behind bug 2. you can't see this one until the one in front is fixed.
three bugs, each masking the next.
↯how the assistant on this page answers you · retrieval-augmented generation

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.

  1. 1you askyour message arrives; the PII shield masks anything private you typed
  2. 2turn it into numbersan embedding model maps the question to a point in meaning-space
  3. 3search two wayskeyword ranking (BM25) and meaning ranking, merged by reciprocal rank
  4. 4pull the passagesthe top few passages from the reviewed corpus, never the whole thing
  5. 5build the promptrules + a one-line index of every card + only those passages
  6. 6answer from themthe model writes from the passages; every token is shield-checked on the way out
you ›
embedding · 384 numbers (first 48 shown)
the corpus · each dot is a passage298 passages
retrieved · merged ranking, top passages only
  • 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
the prompt the model actually sees
rules: ground in the passages, say "I don't have that"one-line index of all 84 cards3 retrieved passages
answer · streams token by tokenshield-checked as it goes

example passages are real headings; scores are illustrative.

Everything else

11 entries, newest first
  1. 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
  2. 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
  3. 2026Doodle FarmCreatures inherit and mutate the prompts that draw them. An orchestrator generates, validates, retries and rescues every asset.image generation · pipelines
  4. 2026Chemical gardenGray-Scott reaction-diffusion you grow with the cursor. The background of this page is its GPU port.simulation · webgl
  5. 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
  6. 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
  7. 2025Autonomous robotArduino rover with computer vision, dead reckoning, A* path finding and PID control, tuned from dozens of Bluetooth-logged runs.c++ · embedded · control
  8. 2025Authenticity watermarkLeast-significant-bit steganography that signs an image and paints a heatmap over tampered regions.python · imaging
  9. 2024Neural net from scratchBackprop and SGD in plain NumPy, trained on MNIST digits (784 → 30 → 10).numpy · ml fundamentals
  10. 2024AI voice detectionTelling human from synthetic speech by the irregularities in high-frequency harmonics on power spectral density plots.signal processing · matlab
  11. 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.

ai & research engineering & school
  1. 2026 →Mathworlda math world kids design, live
  2. 2026 →Project Engineer IPotelco Engineering
  3. 2026Directed research: goal resilience in AI tutorsUW Tacoma
  4. 2026KDD Cup 2026, DABench trackteam DataMinecraftSMP
  5. 2025 – 26M.S. Computer Science & SystemsUW Tacoma
  6. 2025 – 26Dam Safety Engineering InternTacoma Public Utilities
  7. 2024 – 25HVAC Design Engineer InternSpees Design Build
  8. 2023 – 25B.S. Mechanical EngineeringUW Tacoma
  9. 2022 – 24Tutor & engineering club leadTacoma Christian Academy
  10. 2020 – 23A.S. Mechanical EngineeringTacoma Community College
  11. 2017 →Russian ↔ English interpreterfreelance
Mark Malyshev, smiling, next to a student giving a thumbs up at a tutoring desk
tutoring at Tacoma Christian Academy

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.