I'm a test engineer at Ericsson, working with baseband software and radio lab testing for 5G systems. Before that: embedded software at HMS Networks, a stint running a small technical consulting company, and five years studying computer science and engineering at Halmstad University with a focus on AI.

The projects on this site are what I do on weekends. Most of them started because I wanted to understand something properly — how chess engines actually search, how procedural generation can be made principled, how information fusion works when you have heterogeneous sources and no training data. The research tends to come first, then the implementation.

The common thread is Rust and a preference for systems that are simple on the outside and rigorous on the inside.

saltglass-steppe

A deterministic TUI roguelike RPG built in Rust.

The premise: a post-post-apocalyptic desert where ancient glass storms fuse cities into shimmering labyrinths. You play a scavenger-priest navigating a world where light is dangerous, maps are unreliable, and identity is mutable through refraction adaptations.

The TUI isn't a constraint — it's the aesthetic. Particle effects, procedural lighting, animations, and a full camera system, all in the terminal. The game logic runs on a seeded ChaCha8Rng so every run is 100% reproducible from a seed. Everything that can be data-driven is — items, enemies, quests, NPCs, terrain, effects all defined in JSON. The game spawns satellite terminals that communicate via Unix domain sockets with JSON-serialized messages.

The world generation uses terrain-forge (see below), which grew directly out of this project's needs. The Glass Seam Bridging Algorithm was developed here first, then extracted and published.

~46,500 lines of Rust  ·  ~20,300 lines of content definitions  ·  solo, weekends since Oct 2025

terrain-forge

A procedural terrain and dungeon generation library, published on crates.io.

$ cargo add terrain-forge

15 generation algorithms: BSP, Cellular Automata, WFC, Delaunay Triangulation, DLA, Drunkard Walk, Voronoi, Percolation, Diamond Square, and more. Thread-safe, serializable configs, a pipeline system for chaining algorithms, semantic layers for entity spawning, and a demo framework that outputs PNG comparisons.

The novel contribution is the Glass Seam Bridging Algorithm — a connectivity algorithm that finds the optimal set of tunnels to connect disconnected floor regions while minimizing total tunnel length. It uses Perimeter Gradient Descent for tunnel endpoints, then prunes candidates through Delaunay triangulation, angular sector filtering, and occlusion filtering. On a 160×120 cellular automata cave with 97 disconnected regions, it reduces fragmentation to 23 connected regions — a 76% reduction — while adding only 2.1% floor tiles. Documented in a formal write-up included in the repository.

fishy

Multi-source log collection anomaly detection through information fusion.

$ fishy -b logs/baseline/ -c logs/test/
fishy score: 0.82 — something smells off

The question fishy answers: does this collection of logs look like that collection of logs, and if not, where and why? Not "is this log line anomalous" — that's a classification problem. This is a comparison problem: two bounded, complete multi-source collections, measured against each other.

The approach is built on Dempster-Shafer evidence theory. Five analytical methods — distributional divergence, cross-source dependency shift, spectral fingerprinting, co-occurrence structure, and evidence conflict — each produce a basic probability assignment. Those BPAs are combined via Dempster's rule. The score is the fused belief mass on {anomalous}.

Each method's entropy measurement is a first-class observable, not a tuning parameter. Methods operating in a degenerate regime are excluded rather than down-weighted. Methods with low baseline variance produce committed evidence when they detect something; methods with high baseline variance produce uncertain evidence that the fusion naturally ignores. No training, no labels, no learned weights. The calibration is intrinsic.

No deep learning. No GPU. Pure Rust, runs anywhere.

chronicle

Event-centric narrative knowledge graphs with temporal verification.

$ chronicle validate world/
error: actor 'brother_halix' has status Captured as of year 16
       but participates in 'siege_of_silica' (year 20)

World-building rots. You write 45 lore documents and they start contradicting each other — a character dies in one file and shows up alive in another, a city is destroyed but hosts events decades later. Chronicle replaces disconnected prose with a typed knowledge graph where every relationship passes through an event, borrowed from how historians model real history (CIDOC CRM, ISO 21127).

The interesting part: temporal verification using Allen's Interval Algebra. The graph isn't just storage — it's a constraint system. CIDOC CRM was designed for historians analyzing what did happen. Chronicle uses the same formal model to check what can happen. Same math, different direction.

Different sources have different reliability. Archive-drones give near-perfect accounts; NPCs give biased fragments. Two conflicting stories about the same war aren't a bug — they're two subjective fragments with typed fidelity ratings, both queryable against the objective ground truth.

Pure Rust. petgraph + Allen's intervals + RON. ~1,900 lines.

ogun + oku

Spatial layout generation and procedural city building. Two published Rust crates.

$ cargo add ogun    # spatial layout engine
$ cargo add oku     # city generation facade

ogun places nodes and routes edges on a 2D grid using sequential logit dynamics on potential games. Agents arrive one at a time and select positions via Boltzmann sampling against a potential function encoding overlap penalty, pairwise repulsion, and edge attraction. The inverse temperature β controls output character — low β gives organic, irregular layouts; high β gives near-optimal, planned ones. The 500-node stress test (500×500 grid) runs in ~11 seconds — a 24.8× speedup over the naive implementation. Accompanied by a technical write-up.

oku is a domain-specific facade over ogun for PCB-inspired procedural city generation. It translates urban concepts — building types, road demands, growth phases, city eras — into ogun's abstract layout algorithm, then interprets the output back into city layouts. Optionally applies functional erosion to produce ruins. β controls city character: low β gives organic medieval towns, high β gives planned grids.

Both were built for saltglass-steppe's world generation. Named after Yoruba deities.

chess engine

A chess engine and AI written in C#, built in Unity.

Inspired by Sebastian Lague's Chess Coding Adventure, this project started as an exploration of how chess engines actually work and turned into a deep dive into search optimization.

Most of the work went into making the engine fast enough that the AI agents could search meaningfully deep. The move generator uses precomputed attack bitboards for knights and kings, direction lookup tables, and precomputed squares-to-edge data. On top of that: iterative deepening with alpha-beta pruning, a transposition table with Zobrist hashing, quiescence search, move ordering, an opening book, and pawn structure evaluation.

The interesting engineering problem is that all of these techniques interact. Alpha-beta pruning is only as good as your move ordering. Move ordering benefits from the transposition table. The transposition table is only useful if Zobrist hashing is correct. Getting all of it working together correctly is the challenge.

academic

  • Generation of Control Logic from Ordinary Speech Bachelor's thesis, 2022 urn.kb.se →
  • Enhancing Retrieval-Augmented Generation Through Smart Embedding Master's thesis, 2024 urn.kb.se →

technical write-ups

Self-published documentation accompanying the projects — not peer-reviewed, but written to the same standard I'd hold a paper to.

  • fishy: Multi-Source Log Collection Anomaly Detection via Information-Theoretic Evidence Fusion 2026 PDF →
  • Ogun: Spatial Layout Generation via Sequential Logit Dynamics on Potential Games 2026 PDF →
  • Glass Seam Bridging Algorithm PDF →