morphogen.design¶
Combinatorial design: tile assemblies, strut frameworks and search algorithms.
morphogen.design.tiles: tile sets with labelled faces (polarized blocks of combinatorial metamaterials, pipe networks), rotations, geometry of assemblies;morphogen.design.csp: compatible assemblies by wave function collapse with backtracking, exact counting and uniform sampling by transfer matrices, exact count of polarized-block assemblies;morphogen.design.frames: periodic pin-jointed frameworks, random dilution and perturbation, Maxwell-Calladine rigidity analysis;morphogen.design.search: simulated annealing, genetic algorithm, inverse design of cellular-automaton rules.
Public names¶
Framework— Nodes in a periodic box and bars fromnodes[p]tonodes[q] + shift * box.RuleFit— Result offit_rule().SearchResult— Best solution found, its cost and the history of the search.TileSet— Tiles with labelled faces, their geometry and their weights.TransferMatrix— Admissible cross-sections(n1, n2)of a tile set and the transfer matrix between consecutive sections along x (T[s, s'] = 1when section s’ may follow section s).count_assemblies— Exact number of compatible assemblies of a box ofshapetiles.count_polarized_blocks— Number of compatible assemblies of polarized blocks in a box ofshapeblocks.descriptor_cost— Squared errors: relative for the volume fraction and the interface density, absolute for the correlation function.fit_rule— RuleB.../S...(and initial noise density) whose structures best matchtarget.genetic_algorithm— Minimizecostwith a generational genetic algorithm: theelitebest individuals are kept, the others are children of parents chosen by tournaments oftournamentindividuals, bycrossover(if given) thenmutate.pipe_tiles— Nodes joined to some of their faces by straight pipes (phase 1).polarized_blocks— Blocks with one deformation mode: elongation along their axis and contraction along the others (sign +), or the reverse (sign -).sample_uniform— A compatible assembly drawn uniformly at random (exact, by transfer matrix).simulated_annealing— Minimizecostby Metropolis movesx -> neighbour(x, rng)with a geometric cooling fromt_starttot_end(default: from the spread of the costs of 20 random moves, down to a thousandth of it).structure_descriptors— Volume fraction, interface density (fraction of unlike neighbour pairs) and two-point correlationrho(h) = (C(h) - f^2) / (f - f^2)at lags 1..max_lag (mean over the axes of more than one cell).wave_function_collapse— A random compatible assembly ofshapetiles ((n0, n1, 1)for planar sets).