Top views against the targetViste dall'alto e obiettivo
The grey cells are the target outline, the violet ones the top view of each ship (darker where it is taller), with its fitness in the corner; a click chooses the ship to print. The fitness weighs three measures taken on a grid of 48 by 48 cells: 0.6 times the intersection over union of the top view with the target, 0.2 times the closeness of the bulk (the mean height over the top view) to its target, and 0.2 times the closeness of the fore-aft symmetry (the intersection over union of the top view with its mirror image across the beam) to its target. The symmetry from left to right needs no measure, since the grammar mirrors every part off the axis.
Le celle grigie sono la sagoma obiettivo, quelle viola la vista dall'alto di ogni nave (più scure dove è più alta), con la sua fitness nell'angolo; un clic sceglie la nave da stampare. La fitness pesa tre misure prese su una griglia di 48 per 48 celle: 0.6 volte l'intersezione sull'unione della vista dall'alto con l'obiettivo, 0.2 volte la vicinanza della massa (l'altezza media sulla vista dall'alto) al suo obiettivo, e 0.2 volte la vicinanza della simmetria prua-poppa (l'intersezione sull'unione della vista dall'alto con la sua immagine riflessa sul traverso) al suo obiettivo. La simmetria da sinistra a destra non ha bisogno di una misura, perché la grammatica rispecchia ogni parte fuori dall'asse.
Every part is a superquadric of Barr (1981), the solid between a box, a cylinder and an ellipsoid set by two exponents, evaluated by the same code as the giant robots; here it is only turned about the vertical axis and centred on the plane of the back, so that each part rises from that plane as a dome of height c (1 − Ge₂/e₁)e₁/2 over the region where G = |u/a|2/e₂ + |v/b|2/e₂ < 1. The ship, as the union of the parts, is then a height field over its top view: it has a flat back and no overhang, and it prints lying on the back without supports. The genome is read as in grammatical evolution (O'Neill and Ryan, 2001): each choice and each length takes the next number of the list, so that a mutation of one number may change one length or switch a whole rule to another alternative, and every list of numbers gives a valid ship.
Ogni parte è una superquadrica di Barr (1981), il solido fra una scatola, un cilindro e un ellissoide regolato da due esponenti, calcolato dallo stesso codice dei robot giganti; qui è solo ruotata attorno all'asse verticale e centrata sul piano del dorso, così che ogni parte sale da quel piano come una cupola di altezza c (1 − Ge₂/e₁)e₁/2 sulla regione in cui G = |u/a|2/e₂ + |v/b|2/e₂ < 1. La nave, come unione delle parti, è allora un campo di altezze sulla sua vista dall'alto: ha il dorso piatto e nessuno sbalzo, e si stampa sdraiata sul dorso senza supporti. Il genoma si legge come nell'evoluzione grammaticale (O'Neill e Ryan, 2001): ogni scelta e ogni lunghezza prende il numero successivo della lista, così che la mutazione di un numero può cambiare una lunghezza o far passare un'intera regola a un'altra alternativa, e ogni lista di numeri dà una nave valida.
One generation keeps the two best ships and fills the rest of the population with children, each child taking every number from one of two parents chosen by tournaments of three (uniform crossover), and then moving each number, with the probability of the mutation rate, by a Gaussian step of deviation 0.15. The algorithm is deterministic given the seed, so that the link of a fleet rebuilds it; changing a target starts it again from generation 0. ShapeGenetics evolves the derivation trees themselves, with operators that exchange whole subtrees, and it reaches far larger grammars; the fixed list of numbers used here is the simplest encoding of the same idea.
Una generazione tiene le due navi migliori e riempie il resto della popolazione di figli, ognuno dei quali prende ogni numero da uno di due genitori scelti con tornei a tre (incrocio uniforme), e sposta poi ogni numero, con la probabilità del tasso di mutazione, di un passo gaussiano di deviazione 0.15. L'algoritmo è deterministico dato il seme, così che il link di una flotta la ricostruisce; cambiare un obiettivo lo fa ripartire dalla generazione 0. ShapeGenetics fa evolvere gli alberi di derivazione stessi, con operatori che scambiano interi sottoalberi, e arriva a grammatiche molto più grandi; la lista fissa di numeri usata qui è la codifica più semplice della stessa idea.