Periodic Table Generator 2.0

PTG 1.0

Was stored on university fileservers, and so was deleted years ago. I haven't found a copy in any backups so R.I.P. Here's the original guff from 25/02/2009:

This is a prototype for a game idea I sort of had. The BASIC IDEA was that the protagonist would be a normal space freighter guy who fell into a timehole and ended up in a strange universe.

It would combine aspects of roguelikes and elitelikes in that the player has to identify everything about the universe - the ships, the trading goods, the different kinds of planet, government, aliens etc. etc. to play effectively, and attempt to Get Back Home, which would require getting a McGubbin, and so on.

To implement this, everything would have strange names with sort of randomised properties, and one early prototype idea I had for this was replacing the elements with new ones. Originally the idea was to go back to the quantum numbers (n, l, ml, ms) and fucking with them to make whole new shapes of periodic table, but to begin with, I thought I would just stick with the quantum values allowed by our universe and alter the names.

Which idea was taken from the game Mega-lo-Mania (Tyrants: Fight Through Time, in America) which has a sort of similar mechanic - there are various "elements" on the maps the player has to gather, mine or otherwise acquire, and then set Little Computer People to designing weapons with them. The elements have silly names like "Moonlite" and "Alien" -- I think the latter was radioactive and required to build nukes.

Out of this spirit, PERIODIC TABLE GENERATOR was born into, well, here for now. (Dead link).

Here's a sample run, trimmed of a bunch of boring elements:

G gymnogen, Z = 1
L lithium, Z = 2
Si stipendium, Z = 3
H hahnium, Z = 4
Mr myrmidon, Z = 5
...
Nn nonsync, Z = 30
...
O opium, Z = 37
...
Hy harmony, Z = 51
...
Tn tantrum, Z = 73
...
Ai acidhead, Z = 82
Mn monmouth, Z = 83
J judicium, Z = 84
Ee eurhodine, Z = 85
B batoon, Z = 86
Gm gallium, Z = 87
Vc vaccinium, Z = 88
Pr paratorium, Z = 89
As austrium, Z = 90
Bm binarium, Z = 91
Mm mycelium, Z = 92
...
Cu colluvium, Z = 103

In this universe, the stars fuse gymnogen, creating lithium. Plants use the light from this reaction in photosynthesis, converting tiglon dimyosinide into myosinogen, which tiglon-based lifeforms use for respiration. The atmosphere of Earth is, however, largely hexogen.

6 TMo2 + 12 G2Mo -> T6G12Mo6 + 6 Mo2 + 6 G2Mo

I got the wordlist from some website I keep losing, which has fairly big wordlists in several languages, and PRODIGIOUS English ones - it ran to several megabytes, just of lines containing a single word. Even cut down to words ending only in -ine, -ium, -on and so forth, the wordlist data still comes to 200k and the way I did it leaves a bit to be desired for tightness -- just making subfiles of the large file with another python script and packing them all into an "assets" directory. I did trim these lists, though, a lot of them were too boring, or archaic or meaningless. iumfile made it through the fire a little more whole, though - the untrimmed extent above is a pretty fair sample of most of the table, the humour mostly lies in -on, though this run was weak.

It is probably possible to generate a list of elements more likely to be maximally amusing if you trim the lists further, but the preponderance of -ium words from sciences other than chemistry keeps it looking like a good science-flavoured parody -- it's especially rich in biological words, which makes me wonder how terrifyingly vitalist the strange universe in the game would be.

The best part of the program is the file "table" it outputs (though the code that prints it out is awful). Here's a better example from a better run:

                        PERIODIC TABLE OF THE ELEMENTS
  1                                                                    2
  A                                                                    P
  3  4                                             5   6   7   8   9  10
  I Sn                                            Yu   S  Tr  Ar   M  Tn
 11 12                                            13  14  15  16  17  18
 Lg  D                                             C   E  Eh   B  Gy   T
 19 20    21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36
 At Am     H  Hm   O  Sc  Me  Pn  Iv  Dn  Fa  Pc  Em   L  Pp  Ro  Ce  Pl
 37 38    39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54
 Oo Cm    Pm  Er  Pe  Rs  Om  Bm   N  Vm  Oe  Td  Im  Pi  Oi   G  Te  Ln
 55 56 *  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86
 Eo Sm    Ad  Ea  Dt  Fs  Cb  Li  Cn  Cr  Cl  Gr   K  Gd  Ph  Hf  Tt   R
 87 88 % 103
 Pd Sy    Sa

* Minimide   57  58  59  60  61  62  63  64  65  66  67  68  69  70
  Series:    Mn  Sz  Pr  So  Pa   X  Pu  Lm  Tm  Cd  Ci  Ti  Zo  An
% Bisellide  89  90  91  92  93  94  95  96  97  98  99 100 101 102
  Series:    Bs  Cf  Ai  Cc  Bl  Pf   U  Um  Ss  Eq  Tg  Nt  Dm  Au

Listing in order of atomic number:

1: A acylogen       2: P parazonium     3: I incendium      4: Sn sanatarium
5: Yu youpon        6: S sorenson       7: Tr thrombogen    8: Ar aerogen
9: M mimine         10: Tn ton          11: Lg logium       12: D diluvium
13: C centaurium    14: E encheson      15: Eh ephorus      16: B baraddur
17: Gy glycine      18: T thereon       19: At azthionium   20: Am acridium
21: H hahnium       22: Hm helenium     23: O opium         24: Sc sacrarium
25: Me macanese     26: Pn propodeon    27: Iv invercalt    28: Dn dunkel
29: Fa flabbier     30: Pc postsync     31: Em encarpium    32: L lunarium
33: Pp phreatic     34: Ro rhodium      35: Ce codline      36: Pl paleon
37: Oo onosmodium   38: Cm cystidium    39: Pm pilidium     40: Er exosporium
41: Pe ptilimnium   42: Rs residuum     43: Om ommatidium   44: Bm bohemium
45: N nelumbium     46: Vm vomitorium   47: Oe overpower    48: Td tedium
49: Im impluvium    50: Pi prin         51: Oi oligopsony   52: G graphium
53: Te theine       54: Ln latheron     55: Eo elotherium   56: Sm sudatorium
57: Mn minimum      58: Sz syzygium     59: Pr penicilium   60: So sporangium
61: Pa praetorium   62: X xanthium      63: Pu peridium     64: Lm lutetium
65: Tm tertium      66: Cd cadmium      67: Ci criterium    68: Ti taxodium
69: Zo zoocytium    70: An actinium     71: Ad androecium   72: Ea evangelium
73: Dt datum        74: Fs fasten       75: Cb conubium     76: Li lamium
77: Cn coenoecium   78: Cr conundrum    79: Cl cold         80: Gr glamoury
81: K kalium        82: Gd godhead      83: Ph plymouth     84: Hf hafnium
85: Tt tringine     86: R remington     87: Pd proemium     88: Sy symplocium
89: Bs bisellium    90: Cf corallium    91: Ai amianthium   92: Cc cyathium
93: Bl belgium      94: Pf pedalium     95: U unifolium     96: Um uranium
97: Ss sisymbrium   98: Eq echium       99: Tg tentorium    100: Nt notopodium
101: Dm dysprosium  102: Au ammobium    103: Sa stadium

PTG 2.0

Version 2.0 is an improvement, and rewritten from scratch when I went looking for v. 1.0 and realised it was lost. Instead of a text table, it outputs an html file like this.

It's still written in python, but also uses awful SQL code, so it takes much longer to generate -- like, 2 minutes rather than 2 seconds. Whereas v. 1.0 used heavily curated wordlists, v. 2.0 has a giant, indiscriminate English wordlist, with Latin thrown in too. Swelling it even further, any English words ending in -ius, -ious, -ios, -os or similar, got translated into -ium and -um because that's how cases work. The same happened to other homonyms.

Download it here. I think it includes all the packages you need.