totient.dev

Ethan.

xkcd2645

I make stuff - mostly software, sometimes chaos. These are the things I’ve built, shipped, or abandoned with love <3.

407contributions on GitHub in the last year
46public repositories
21stars on my own repositories
6followers on GitHub

Work

5 projects
  1. Oct 2026 Active

    Solstice – A Superhuman Chess Engine

    A C++ chess engine leveraging NNUE (Efficiently Updatable Neural Networks) for a very strong evaluation trained with billions of chess positions, paired with a highly optimised principal-variation alpha-beta search. Engine is currently about 3690 elo, and ranks within the top 50 best chess engines in the world.

    # Data
    Originally trained on a small labelled dataset known as "lichess-big3". The next few networks were trained on hundred of millions of self-play games. The current network uses open-sourced data (billions of labelled positions) from the LC0 project.

    # Network
    The current network is a 768x4->512x2->1 perspective network with 4 king buckets.

    # Training
    Training was done with an open-sourced trainer by Jamie Whiting known as "bullet" - more info in the github.

    Built with: C++python

  2. Jun 2026 Archived

    SpotLight – Know Your Sound

    **SpotLight** brings your sound to life.

    Drop in your playlist and within seconds the site determines your **listener archetype**, which is your sound's emotional fingerprint, calculated based on the decades that shaped your taste, and the artists you actually orbit around.

    In the backend, the site crunches every audio feature Spotify tracks, including energy, danceability, valence, acousticness, BPM, key, and more, revealing your personal music tendencies.

    **Features**
    - Your personal **listener archetype** - are you a Deep Diver, a Hype Machine, a Melancholic Romantic?
    - Your **Musical DNA** - how your library scores across mood, energy, tempo, and danceability compared to the broader world
    - **Artist & genre breakdowns** - who you really listen to vs who you think you do
    - **Decade analysis** - how your taste spans eras, and what each era sounds like in your collection
    - A **full audio feature correlation matrix**, BPM zone analysis, heatmaps showing when you save the most music, artist depth and popularity and so much more

    Built with: htmlcssjs

  3. May 2026 Archived

    AIMELab – Your personal math olympiad practice site

    Your personal math olympiad practice site. Practice AMC 8, AMC 10, AMC 12, and AIME problems. Filter by competition, track your history, run mock tests, and analyze your performance across 3700+ unique problems.

    All the olympiad problems were taken from a kaggle dataset (link found in github). The asymptote api compile server is hosted with render and is also part of another github repo. The platform allows u to try out random AIME problems, unseen problems as well as redo problems u got wrong last time. There is a also a practice functionality which allows u to customise your own practice sessions.

    All data from the practice is saved locally in your device's localstorage (currently) and is completely private. I am considering scaling this to make it public in the future to provide a leaderboard functionality maybe. You can also browse past AIME problems using the browse functionality and attempt specific problems. The statistic page allows u to view detailed statistics about your performance over time, streaks as well as overall accuracy by problem number. You can also revisit your past problems through the history tab. There are also various acessibility/themes settings for u to explore :) Have funn

    Built with: phpmysqlcssjspython

  4. Aug 2025 Archived

    UnmaskCheer – A game about toxic positivity

    **UNmaskCheer** is a project by class 3G 2025 of BPGHs to promote mental wellbeing through the teaching of a phenomenon known as "toxic positivity", where overly-positive feedback/advice/mindset in the wrong context could lead to one feeling much worse. These types of mindsets are known as toxic-positive mindsets, and they neglect one's true feelings. Toxic positivity in daily life usually arises from several common factors like peer pressure, pressure to meet expectations, or fear of judgement. We, as a class, feel strongly to advocate against such a mentality on life and have come up with a game to teach our fellow students to spot symptoms and signs of toxic positivity. We hope this short and simple online game can help foster a more comforting and accepting school environment.

    Built with: phpmysqlcssjs

  5. Aug 2025 Archived

    Weak Chess Engine – A Fun Journey

    My first serious attempt at a chess engine, with the help of many members of the Stockfish Discord server and the Chess Engine Programming Discord server (Matt (Heimdall), Dan (Calvin), Eren (Potential)) and so many more people I managed to get this engine to superhuman (>3000 elo) level measured by the CCRL Chess Engine ratings list.

    Built with: C++

Solstice, up close

A chess engine I've been building since September 2026. Currently in active development.

01 · Search

It looks ahead through about three million positions a second, on one core.

Principal-variation alpha-beta search with null-move pruning, late-move reductions, singular extensions and five correction histories, tuned by SPSA across 89 parameters.

02 · Evaluation

A neural network judges every position it reaches.

An efficiently updatable network (NNUE, 768×4 → 512 → 1) trained with bullet on 1.05 billion positions from Leela Chess Zero’s training data.

03 · Testing

Nothing gets in without winning a match first.

Every change plays thousands of games against the previous version in a statistical test (SPRT) on SolsticeBench, a self-hosted OpenBench. Over 220 tests so far, failures included.

04 · Strength

About 3690 on the CCRL Blitz scale.

Estimated from 640 games at 60+0.6 against eight engines rated 3529–3745, scoring 59.5%.

Solstice so far

  1. First moves

    A board, a search and a small network trained on a public dataset of positions labelled only with game results.

  2. Learning from itself

    Generation after generation of networks trained on Solstice’s own self-play games, up to 819 million positions.

  3. Its own move generator

    A board representation and legal move generator written from scratch, checked against 4.8 billion perft nodes.

  4. In the browser, and a first rating

    Compiled to WebAssembly to play in the browser. First gauntlet: about 3420 CCRL Blitz.

  5. 3549

    Bigger networks and a long run of search improvements, against stronger opponents.

  6. Leela data, and 3687

    The first network trained on Leela Chess Zero data gained 41 Elo; the next gauntlet put Solstice at 3687 ± 14.

On GitHub

@Dragjon

2025-10-122025-10-132025-10-142025-10-152025-10-162025-10-172025-10-182025-10-192025-10-202025-10-212025-10-222025-10-232025-10-242025-10-252025-10-262025-10-272025-10-282025-10-292025-10-302025-10-312025-11-012025-11-022025-11-032025-11-042025-11-052025-11-062025-11-072025-11-082025-11-092025-11-102025-11-112025-11-122025-11-132025-11-142025-11-152025-11-162025-11-172025-11-182025-11-192025-11-202025-11-212025-11-222025-11-232025-11-242025-11-252025-11-262025-11-272025-11-282025-11-292025-11-302025-12-012025-12-022025-12-032025-12-042025-12-052025-12-062025-12-072025-12-082025-12-092025-12-102025-12-112025-12-122025-12-132025-12-142025-12-152025-12-162025-12-172025-12-182025-12-192025-12-202025-12-212025-12-222025-12-232025-12-242025-12-252025-12-262025-12-272025-12-282025-12-292025-12-302025-12-312026-01-012026-01-022026-01-032026-01-042026-01-052026-01-062026-01-072026-01-082026-01-092026-01-102026-01-112026-01-122026-01-132026-01-142026-01-152026-01-162026-01-172026-01-182026-01-192026-01-202026-01-212026-01-222026-01-232026-01-242026-01-252026-01-262026-01-272026-01-282026-01-292026-01-302026-01-312026-02-012026-02-022026-02-032026-02-042026-02-052026-02-062026-02-072026-02-082026-02-092026-02-102026-02-112026-02-122026-02-132026-02-142026-02-152026-02-162026-02-172026-02-182026-02-192026-02-202026-02-212026-02-222026-02-232026-02-242026-02-252026-02-262026-02-272026-02-282026-03-012026-03-022026-03-032026-03-042026-03-052026-03-062026-03-072026-03-082026-03-092026-03-102026-03-112026-03-122026-03-132026-03-142026-03-152026-03-162026-03-172026-03-182026-03-192026-03-202026-03-212026-03-222026-03-232026-03-242026-03-252026-03-262026-03-272026-03-282026-03-292026-03-302026-03-312026-04-012026-04-022026-04-032026-04-042026-04-052026-04-062026-04-072026-04-082026-04-092026-04-102026-04-112026-04-122026-04-132026-04-142026-04-152026-04-162026-04-172026-04-182026-04-192026-04-202026-04-212026-04-222026-04-232026-04-242026-04-252026-04-262026-04-272026-04-282026-04-292026-04-302026-05-012026-05-022026-05-032026-05-042026-05-052026-05-062026-05-072026-05-082026-05-092026-05-102026-05-112026-05-122026-05-132026-05-142026-05-152026-05-162026-05-172026-05-182026-05-192026-05-202026-05-212026-05-222026-05-232026-05-242026-05-252026-05-262026-05-272026-05-282026-05-292026-05-302026-05-312026-06-012026-06-022026-06-032026-06-042026-06-052026-06-062026-06-072026-06-082026-06-092026-06-102026-06-112026-06-122026-06-132026-06-142026-06-152026-06-162026-06-172026-06-182026-06-192026-06-202026-06-212026-06-222026-06-232026-06-242026-06-252026-06-262026-06-272026-06-282026-06-292026-06-302026-07-012026-07-022026-07-032026-07-042026-07-052026-07-062026-07-072026-07-082026-07-092026-07-102026-07-112026-07-122026-07-132026-07-142026-07-152026-07-162026-07-172026-07-182026-07-192026-07-202026-07-212026-07-222026-07-232026-07-242026-07-252026-07-262026-07-272026-07-282026-07-292026-07-302026-07-312026-08-012026-08-022026-08-032026-08-042026-08-052026-08-062026-08-072026-08-082026-08-092026-08-102026-08-112026-08-122026-08-132026-08-142026-08-152026-08-162026-08-172026-08-182026-08-192026-08-202026-08-212026-08-222026-08-232026-08-242026-08-252026-08-262026-08-272026-08-282026-08-292026-08-302026-08-312026-09-012026-09-022026-09-032026-09-042026-09-052026-09-062026-09-072026-09-082026-09-092026-09-102026-09-112026-09-122026-09-132026-09-142026-09-152026-09-162026-09-172026-09-182026-09-192026-09-202026-09-212026-09-222026-09-232026-09-242026-09-252026-09-262026-09-272026-09-282026-09-292026-09-302026-10-012026-10-022026-10-032026-10-042026-10-052026-10-062026-10-072026-10-082026-10-092026-10-102026-10-112026-10-122026-10-132026-10-142026-10-15
Oct 2025 – Oct 2026less more

Now

Training a much bigger network with 16 king buckets and 1,024 neurons on 4.7 billion positions, and teaching Solstice to scale well with multithreading.

The goal: the strongest chess engine after Stockfish.

About

Ethan

HII! I'm Ethan Pan, aka xkcd2645. I like building things that are useful, weird, or both.

I spend most of my free time either writing code, eating pizza, or sleeping and occasionally get distracted by random interesting math - hence the domain. Euler’s totient function φ(n) counts the integers up to n that are coprime to n. Pretty cool, right? (you're supposed to agree here :)

This site is where I collect the things I've made. Some are serious projects, some are quirky experiments, but all of them were really fun to build. After all, it's the friends we made along the way amirite? :-)

Works with
PHP, JavaScript, Python, C++, Linux
Into
Open source, chess engines, math olympiads

Background

Here's a bit more about me and how I learned coding.

A Brief Timeline

  1. Dabbled with HTML, playing with divs, spans, tables and throwing H1s all around the page.

  2. Learnt python, tried creating a chess-playing program which kinda worked. Engine uses a simple evaluation with piece values and piece square tables as well as an alpha-beta minimax search.

  3. Learnt C# and participated in a chess coding competition. Engine has several optimisations including pruning techniques like NMP, RFP, FP and uses advanced move ordering.

  4. Learnt C++ and built a superhuman chess engine with the help of a community. Engine is heavily optimised and tested with SPRT. Engine values are tuned with SPSA. Further developments in engine evaluation with the help of a texel tuner.

How I Started

  1. EONS ago, back in Primary 4, my dad bought me a "mini laptop", which was a Chromebook, and taught me how to code in HTML, CSS and JS to create my very own websites. That's when I started fumbling around with frontend development, creating a few interesting mini sites including a poetry site, a chess website and a super simple animal encyclopedia that could make animals noises. Sadly, many of these sources were lost after my Chromebook spoiled.

  2. After I finally got a proper laptop, I also started learning a new programming language - python. Mostly with the help of ChatGPT back in Primary 6, I taught myself the basic syntax of python and how to write my first fully functional chess-playing program with the minimax algorithm. This chess program wasn't any good though, and I considered it quite a failure, but the fun was undeniable.

  3. After my PSLE, I was accepted into my dream school then, BPGHS. I was elated. Between year 1 and 2, having become quite fluent in python, I decided to challenge myself to learn C# and participate in a chess coding and token optimisation competition hosted by the one and only Sebastian Lague on Youtube. However, it turned out I was too ambitious and could not finish the project in time before the deadline. Sad, but I was grateful to be able to learn C# while I'm at it.

  4. When year 3 arrived, I decided it was time to learn C++, a language that is arguably one of the most fundamental and impactful in software development, but I learnt it cuz I heard it was quite fast. Guess how I decided to approach learning the language? Yes- by creating another chess engine. This time, I had to make it count and successfully created Weak, a Superhuman chess engine, with the help of fellow members in the Stockfish Discord server.

Outside of Code

8 interests
  • Chess

    Chess is life, basically. When there are no exams, I frequently go to local chess clubs - eg. Queenstown Chess Club on Sundays - to play a few games. Started loving chess ever since Primary 3 when my school introduced a board game programme.

  • Photography

    Ever since I got my first DSLR in Sec 3, I've been completely engrossed in taking amazing pictures. A few Youtube videos later, I learnt about composition, lighting and editing techniques the make a picture pop! I find intentional photography has quite the power to keep memories alive.

  • Ukulele

    After my mum first gave me her mini ukulele, I played it whenever I felt sad or emotionally not ok because it has a way of calming me. Now I play it mostly out of enjoyment. I sometimes do fingerstyle on the uke to create melodies but I'm in no way an expert.

  • Astronomy

    Joined the Astronomy club of BP in Sec 3 for one reason - to learn more about the Cosmos! The experience was one-of-a-kind and exposed me to very interesting topics that I've never come across in school, ever. I'm also a proud PISCES.

  • Cybersecurity

    Yes, I like hacking stuff, ethically. I enjoy doing CTF challenges in HackTheBox and am currently studying network security and penetration testing.

  • Chemistry

    I've a mini home chemistry lab with all the standard school apparatus as well as additional apparatus to do cool experiments. Some of my favourites are the different coloured flames, iodine-clock reaction and the chameleon reaction.

  • Math and Physics Olympiads

    I've joined the Singapore Math Olympiad ever since Sec 2. I was not particularly good at those though, only obtaining a Bronze at both junior and senior level. In Sec 3 I joined the SJPO and also got a Bronze, which I was really proud of. In 2026, I joined the International Mathematical Modelling Challenge (IMMC) and wrote about a 50-page report on using mathematics to solve real world challenges.

  • Camping

    Will always love camping as a Scout. As they say once a scout always a scout! I enjoy outdoor activities when I'm not coding and I hope to "touch grass" more often.

Sign in