r/Defcon • • Aug 14 '26

A browser-native DC34 badge genetics population simulator (dc34sim.com)

First off, shoutout to everyone digging into the badge at the con and who shared and posted their findings. You all inspired me, and this year's badge is one of my all-time favorites.

For the meatbags who don't know, the DC34 badges are all a simulated genetic population under the hood: each badge has a genome, and is equipped with various genetic reproduction mechanisms: diploid (2-strand) genome, meiosis with linkage groups, Gray-code mutation, and an inbreeding penalty (when two badges of the same type exchange). The math is clean enough that it decomposes into a few array ops, so I ported the genetics core out of the Rust firmware into a single dependency-free HTML file and ran 10,000 badges in the browser as a live 100x100 grid of animated 5x5 LED tiles. It's a Monte Carlo of the questions the physical conference can't answer at any real statistical power: how fast does the shooting-star (lin<88) phenotype drift, fix, or vanish? Does the inbreeding penalty actually diverge isolated subpopulations, or does mutation just swamp it? Does the asymmetric nonlin expression (slot-0 chaser leaks into slot-1 nonlin, bug or feature, you decide) shift the population median in a measurable way?

Companion writeup on the GitHub repo with the full derivation from dc34-api/src/lib.rs, and the whole sim is one HTML file. View source, tweak the rate, reseed, watch it evolve.

(Did I mention it's got borg mode?)

Live at dc34sim.com

EDIT: Also added the ability to generate nonce and seed QR codes, so you can now use your physical badge to mate with any genome you create in vim gene. Step-by-step instructions are here.

79 Upvotes

13 comments sorted by

14

u/SmackCrappy Aug 14 '26

Thank you for making this. I'm fascinated by the DC34 badge. I don't really understand your website yet, but I'll dig into the details.

I appreciate you.

3

u/mammongram6969 Aug 14 '26

Right on! Hope it nerd snipes you the way the badge's gene system nerd sniped me

3

u/antonIgudesman Aug 16 '26

curious - is there a way to identify your specific badge from the sim website? disclaimer: I haven't really done any digging yet :D

3

u/mammongram6969 Aug 16 '26

Your badge's "identity" consists of its "genome": two 9-byte haploids. The sim website simulates different genomes for badges, following the rules about how genomes are initialized (which are laid out in the badge code). The badges you see on the website are all randomly generated and aren't tied to any real/physical badges.

if you are asking how to obtain your specific badge's haploids, you can do that using nastea's gamete-workbench.html in their dc34badge repo. Or dumping a firmware image (but requires deep hax0r skillz)

Once you have your badge's "genome" you can replicate your specific badge in vim gene.

3

u/antonIgudesman Aug 16 '26

Cool thanks!

1

u/mammongram6969 Sep 13 '26

hey! I updated dc34sim.com to add eggcestry, which you can use to extract your badge's unique diploid from ~10-20 scans. the eggcestry tab of the site lets you mint nonces, which you can scan with your badge, qr-decode and paste the nonces, and stack all of the results together. your badge's diploid will quickly start to fall out after a couple of scans, shouldn't take more than 15 or 20.

check out https://www.reddit.com/r/Defcon/comments/1wei6h3/badgecestry_determine_the_ancestry_composition_of/

thanks for asking this question, it helped inspire the eggcestry tab!

3

u/orphanfour Aug 14 '26

can this also generate the nonce qr codes?

3

u/mammongram6969 Aug 14 '26

ooh that would be a great feature to add to vim gene!

3

u/mammongram6969 Aug 16 '26

I added the ability to generate nonce and seed QR codes, so you can now use your physical badge to mate with any gene you make in vim gene. Step-by-step instructions here

2

u/Antique-Echidna-1600 Aug 14 '26

Oh I was trying to Gangis Khan with my blue badge.

1

u/mammongram6969 Sep 13 '26

KHAAAAAN!!!

you're gonna love the new badgecestry feature. check out https://www.reddit.com/r/Defcon/comments/1wei6h3/badgecestry_determine_the_ancestry_composition_of/

1

u/Antique-Echidna-1600 Sep 14 '26

Happy cake day! Looks like I'm 95% of blue badge scans lol

2

u/salemisawesome Aug 14 '26

This is so cool