tutorial : documentation: Agency


TUTORIAL CONTENTS

2.0 Starting a Run

3.0 Interface Components
   3.1 Population
       3.1.1 Modify Individual
   3.2 Agent Control
       3.2.1 Bounding Box
       3.2.2 Shape Size
       3.2.3 Number of Shapes
       3.2.4 Local Bounding Box
       3.2.5 Overall Design Height
   3.3 ZoneType
   3.4 Genetic Engine
   3.5 Settings
   3.6 Miscellaneous
   3.7 About

4.0 Glossary



back to Documentation Main



2.0 Starting a Run

Before invoking the AgencyGP plug-in, you must set up the Maya scene on which you want it to operate. The elements of this scene will be the planar NURBS curves which will be extruded into space and the shaders you wish to use to indicate zones of different types.
  1. Set up your NURBS curves.
    AgencyGP will operate on any set of NURBS curves without height components. That means you are free to load or create any curves you wish on any plane parallel to the base plane. These are the curves that will be manipulated and extruded in the GP. They may come from any sort of analysis or investigation.
  2. Set up your shaders.
    AgencyGP will allow you to establish any number of types of zones with different desired spatial characteristcs. It will communicate what shape has been assigned to what zone by assigning a particular shader to it. So set up at least as many shaders as you are interested in having zone types and make them different enough in color or other characteristic to make them easily distinguishable. Give them names that you will be able to recognize them by: their color or their intended zone type are good choices.
  3. Set the Shading mode to smooth.
    From the Shading menu at the top of your drawing window, select Smooth Shade All.
  4. Position your scene.
    You will not be able to reposition or change the camera angle at all while AgencyGP is running, so it is essential that you set up your scene so that its contents can be easily evaluated during the run. The AgencyGP interface is somewhat large, so it is a good idea to make your scene somewhat small and position it to the bottom left of the screen. Rotate it so that your base plane is very oblique to the camera. That way tall extrusions will not be as likely to extend off the screen. Here is a picture of a scene properly positioned for a run of AgencyGP.

  5. Save your Maya scene.
    Please now save your scene. Nothing in this world is certain, and this is a great time to safeguard your work.
  6. Select the curves you wish AgencyGP to operate on.
    Note that the more curves you select, the slower each generation will be to compute. There is a fairly low practical limit to how many curves it makes sense to select for a run. (No more than 5 for a quick run; no more than 20 for a slow run.)
  7. Hit the button in Shelf 1 to invoke AgencyGP.
    If the button does not appear or the interface deos not appear after the button is pressed, consult troubleshooting.
  8. The Population dialog page will show up. The only availavle option on it will be the "Initialize Population" button
    After setting up your zoneTypes, agents, and genetic engine the way you want them and saving your settings (see Interface), initialize your population, and begin evolving designs.

3.0 Interface Components

These images depict the dialog box from which AgencyGP runs. Please click on the image to learn more about the interface. The buttons and tabs within the image will either link you to the related dialog box or bring up a description in the text box beside it.

When you first invoke AgencyGP, your only option from the Population dialog box is "Initialize Population". You can click on it now to show you the full Population page interface. When you are running AgencyGP, however, it is recommended that you set up all of the settings you want for your run before you initialize your population.

You may wish to modify settings for zoneTypes, agents, or the genetic engine.

Population control dialog box Population control dialog box Population control dialog box Population control dialog box Population control dialog box Population control dialog box Population control dialog box


3.1 Population
This is the dialog page from which you control the evolutionary process by creating new generations of designs.

Click on any region in the image below to find out more about what it means.

     
   
Population control dialog box Information about the individual currently being displayed The number of generations run Statistics from the genetic engine Save the current individual Modify the current individual The unfitness for the current individual View another individual The fitness for the entire population The population size Execute X generations Save the entire population Execute 1 generation About Settings Genetic Engine Zone Types Agent Control OK Cancel


3.1.1 Modify Individual
This is the dialog from which you can intervene directly in evolution and change an individual's genotype manually.

Modify Individual will take you to a new dialog in which an individual's genotype may be modified directly and its fitness changed. Changes you make to the individual will show up in your Maya scene so you can see what you are doing. If you want to make fine adjustments to a design before evolution continues, select this. If you want the changes you make to have a chance of surviving in future generations, be sure to give your modified design a low unfitness to give it a better chance of having many offspring.

Note: AgencyGP's Z dimension is up/down. It corresponds to Maya's Y dimension.

Click on any region in the image below to find out more about what it means.

     
   
Modify Individual dialog box Z Widening Commands Commands Commands Commands Commands Curve Shape Mode Z Start z Height Curve Curve Append Opening Command Parameters Insert Scale Insert Translation Commands Zone Typ Shape Parameter Append Translation Append Scale Append Rotation Command Parameters Delete Command Apply Changes Insert Rotation Insert Opening Insert Command Append Command Change Unfitness Population Done Make Copies


3.2 Agent Control

Click on any region in the image below to find out more about what it means.

     
   
Population About Settings Genetic Engine Zone Types Miscellaneous OK Cancel Change the number of deployed agents Displays an Agents impression Change the weight of the agent Use these settings for all ZoneTypes How to edit an agents settings The name of the agent The number of agents deployed The agent's weight Select another ZoneType to edit the agent settings Description of the AgentLocalBoundingBox Description of AgentBoundingBox Description of AgentShapeSize Description of AgentNumShapes AgentType


3.2.1 Bounding Box
The Bounding Box agent expresses a preference for all shapes of a certain zoneType to fall within a theoretical box of editable dimensions.

A design's unfitness as evaluated by AgentBoundingBox is a weighted cumulative total of the amounts by which the all the shapes of a certain zoneType, taken together as a unit, exceed the boundaries of the established bounding box. If they all lie entirely within the bounding box, the reported unfitness is 0.000. If a design contains no shapes of the zoneType in question, this agent is ignored and its evaluation will not figure in the design's overall unfitness.

The Bounding Box agent is good for determining a region of the overall design in which you would like shapes of a certain zoneType to reside.

Note: AgencyGP's Z dimension is up/down. It corresponds to Maya's Y dimension.

Click on any region in the image below to find out more about what it means.

     
   
Change the side of the bounding box Move the center of the BoundingBox OK Cancel Change the weight for the different directions Indicates what ZoneType we are currently working with Copy these settings to all ZoneTypes

3.2.2 Shape Size
The Shape Size agent expresses a preference for the X, Y, and Z extents of each shape of a certain zoneType to fall within a editable ranges.

A design's unfitness as evaluated by AgentShapeSize is a weighted average of the amounts by which the size along each axis of each shape of a certain zoneType falls outside its specified range. If each shape's dimensions lie within the specified ranges, the reported unfitness is 0.000. If a design contains no shapes of the zoneType in question, this agent is ignored and its evaluation will not figure in the design's overall unfitness.

The Shape Size agent is good for determining the size and axial proportions of shapes of a certain zoneType.

Note: AgencyGP's Z dimension is up/down. It corresponds to Maya's Y dimension.

Click on any region in the image below to find out more about what it means.

     
   
OK Weight for the dimension Maximum shape size Minimum shape size Cancel The Agent's ZoneType Use these settings for all ZoneTypes

3.2.3 Number of Shapes

The Number of Shapes agent expresses a preference for a specific proportion of the shapes in a design to be of a certain zoneType.

A design's unfitness as evaluated by AgentNumShapes is a measure of how much the proportion of shapes of a specific zoneType in a design differs from the desired proportion.

The Number of Shapes agent is good for determining the desired mix of zoneTypes in your designs. If you find that constraints you have placed on other agent types makes a certain zoneType less or more likely to appear than you wish, you may rectify that by adjusting the preferences of this agent.

Click on any region in the image below to find out more about what it means.

     
   
OK How many of these shapes are desired Cancel The ZoneType of the agent Copy these settings to the other agents

3.2.4 Local Bounding Box
This agent controls how the ZoneTypes interact with each other. Each ZoneType can potentially affect all the other ZoneTypes and thus give rise to very intericated relationship.

You can use this agent to control how the ZoneTypes intersect.

Since the number of possible intersections grows exponentially it might be a good idea to set the number of deployed agents to zero if you do not care about the intersections. This might significantly speed up the computations.

Click on any region in the image below to find out more about what it means.

     
   
The ZoneTypes The agent's ZoneType OK Cancel Change the Inside Weight for the agent Should these ZoneTypes intersect

3.2.5 Overall Design Height
This agent looks at the total height of the design, and takes no regard of the ZoneTypes of the objects in the scene. The agent looks at the difference between the maximum and the minimum z-value of the objects in the scene.

Click on any region in the image below to find out more about what it means.

     
   
Change the desired height OK Cancel

3.3 ZoneType
This is the dialog page from which you set up and modify the zoneTypes that your individuals contain.

Click on any region in the image below to find out more about what it means.

     
   
List of all the ZoneTypes Add a new ZoneType Change shader for a ZoneType Change the name of a ZoneType Remove one of the ZoneTypes Change the mutationrate for a ZoneType Disallow mutations into or away from this ZoneType OK Cancel Name of the corresponding shader Name of the ZoneType Population Agent Control Genetic Engine Settings About Miscellaneous


3.4 Genetic Engine
This is the dialog page from which you modify the preferences of the evolutionary process itself.

Click on any region in the image below to find out more about what it means.

     
   
Genetic engine dialog box How large proportion should change Z-widening CHange the size of the population How many mutations should be parameter shape mutations How many mutations should  be command deletions How many insertions should be at the end How many insertions should be in the middle How many mutations should  be command insertions How large proportion should change Shape mode Change the number of elites that gets copied into the next generation Change the number of elites How large proportion should change ZoneType CHange the tournament size About Settings Zone Types Agent Control Population OK Cancel How large proportion should change Z-height How large proportion should change Z-start How many mutations should  be command changes How many changes should be according to the parameters How many changes should be fully randomized How many mutations should  be crossover


3.5 Settings
This is the dialog page from which you load or save the preferences you have set up for agents, zoneTypes, and the Genetic Engine.

Click on any region in the image below to find out more about what it means.

     
   
Population Settings Agent Control Settings Miscellaneous ZoneType Settings Genetic Engine Properties About AgencyGP What file the Settings were read from Load new settings from a  file Load the default settings from file Save the settings to file Make these settings default Restore to the factory defaults 42 OK Cancel


3.6 Miscellaneous
Here you can find a couple of tools that are useful for viewing the scene.

Click on any region in the image below to find out more about what it means.

     
   
Rotate the scene around the given axis Get the original perspective Zoom out The normal of the plane points in this direction Adjust the side of the plane Change the position of the plane Population Agent Control Zone Types Genetic Engine Settings About


3.7 About
This is the dialog page that displays information about AgencyGP.

Click on any region in the image below to find out more about what it means.

     
   
OK Cancel Population Agent Control ZoneType Genetic Engine Settings Miscellaneous Martin Hemberg! Martin Hemberg!! Help


4.0 Glossary

Agent
An autonomous evaluative entity. It is deployed into a design and its evaluation of the design based on its editable criteria are accumulated with the opinions of other agents into the fitness measure of the design.

Bounding Box
A three-dimensional region outside of which a design is penalized for extending.

Command/Operation
A unit of our language. The commands are Opening, Translation, Scale, and Rotation.

Command List
Every shape in every design maintains an evolvable list of commands in our language which constitute part of its genotype. When the genotype is translated into the phenotype for evaluation by agents, the command list is run on the starting Maya curve, and the result is extruded into space.

Crossover
Analogous to biological genetic crossover: the replacement of a randomly selected segement of a shape's command list with a randomly selected segment of a command list from another shape.

Design
A design is the same as an individual. It is a member of a population, and consists of a genotype, a set of starting Maya curves, and a phenotype of shapes interpreted from the two.

Elite
Elites are individuals of the highest fitness that are transported directly into the new population without mutation.

Fitness
Fitness is the measure of quality that agents collectively give a design. Higher fitness means greater liklihood of having more offspring. So traits that the agents favor are selected for.

Generation
A generation is a name for a specific population of individuals. Generations are numbered sequentially.

Genetic Algorithms [GA]
The precursor to genetic programming, Genetic Algorithms use fixed-length, encoded genotypes, where Genetic Programming uses variable-size genotypes representing operations in an interpreted language.

Genetic Programming [GP]
A software methodology that seeks to evolve solutions to problems by generating populations of programs and then selectively breeding them.

Genotype
In the case of AgencyGP, a genotype consists of a set of Maya curves, a fixed-length list of parameters, and a variable-length list of commands.

Individual
See design.

Interruption, Intervention, and Resumption
The ability to stop and manually redirect the evolutionary process by manipulating the genotypes of individuals. AgencyGP allows this through the Modify Individual dialog.

Layer
A layer in a Maya scene is a method of grouping and showing or hiding objects. AgencyGP creates new layers to save intermediate results when requested.

Mutation
The random changing of a genotype in moving from one generation to the next. Mutation takes many forms in AgencyGP. They are all examined in the Genetic Engine dialog documentation.

NURBS curve
Non-uniform ration b-spline curve. This is the kind of geometry Maya creates that AgencyGP is capable of working with.

Phenotype
The physical expression of an individual's genotype. In the case of AgencyGP, the phenotype consists of one or many extruded shapes in a Maya scene.

Plug-in
A piece of software written in C++ that makes use of Maya's programming interface. It is a separate file that Maya loads and executes upon command.

Population
A population is a group of individuals ranked by fitness.

Pressure
Pressure is what good agents apply to the evolutionary process. Agents do not control what future generations will look like directly. Rather through selective pressure, they choose their favorite designs to reproduce. If a set of agents is too permissive, they will not be applying sufficient pressure to the system.

Shader
A shader is a Maya object that stores settings for rendering color, texture, and opacity of a surface.

Shape
A shape in an individual is one extruded element. Individuals may consist of many shapes. There may be more or fewer shapes in an interpreted phenotype than there were initial curves selected because of the variable effects of intersecting shapes.

Shape Mode
Shape mode determines how a shape behaves when it intersects with others. It may carve out of the other shape; it may be carved into itself; it may union with the other shape; they may intersect. There are 45 options, really three consecutive groups of 15.

Tournament Selection
Tournament size affects the way individuals are selected for breeding the new population. When creating a new population, the process is as follows: 1. Select [Tournament Size] individuals from the old population. 2. Take the fittest of these and make a copy of it. 3. Mutate the copy, cross its genes with another individual's or leave it be. 4. Place this copy into the new population. 5. Repeat 1-4 until the new population is filled.

Unfitness
AgencyGP ranks designs by unfitness. Therefore a low unfitness is better than a high one.

Variance
A measure of the amount of variation there is in a population. AgencyGP uses variance in fitness to estimate the genetic variance in a population, but that is a rather crude estimate. If agents are overly permissive, radically different individuals may be given the same low unfitness. It is, however, a convenient measure, and we use it.

Weight
The weight of a value is the emphasis a value is given when combining it with others. It only has meaning relative to the weights of the other values. 100 is neither a high nor a low weight. In the list 1, 1, 100 it is high. In the list 1000, 1000, 100, it is low.

Z-Height
This is a parameter of a shape which determines how tall its extrusion is. Remember that this may not represent the final height of the shape because all of the commands in the command list are executed on each shape before it is extruded. It may therefore be scaled up or down multiple times.

ZoneType
Before you use AgencyGP fully you must determine the parameters of your investigation. AgencyGP is best at dealing with problems in which desires of different types of spatial regions can be brought to apply pressure to one another.

Z-Widening
This is a parameter of a shape which determines the amount that a shape flares outward when extruded. A value higher than 1 flares outward, a value less than 1 contracts inward, and a value of 1 extrudes straight up.




home   |   media : publications   |   files : documentation