| 172 | static const cString GetDescription() { return "Arguments: <int length> [int cell_id=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]"; } |
| 173 | |
| 174 | void Process(cAvidaContext& ctx) |
| 175 | { |
| 176 | const cInstSet& is = m_world->GetHardwareManager().GetDefaultInstSet(); |
| 177 | HashPropertyMap props; |
| 178 | cHardwareManager::SetupPropertyMap(props, (const char*)is.GetInstSetName()); |
| 179 | Genome genome(is.GetHardwareType(), props, GeneticRepresentationPtr(new InstructionSequence(m_length))); |
| 180 | InstructionSequencePtr seq_p; |
| 181 | seq_p.DynamicCastFrom(genome.Representation()); |
| 182 | InstructionSequence& seq = *seq_p; |
| 183 | for (int i = 0; i < m_length; i++) seq[i] = is.GetRandomInst(ctx); |
| 184 | m_world->GetPopulation().Inject(genome, Systematics::Source(Systematics::DIVISION, "random", true), ctx, m_cell_id, m_merit, m_lineage_label, m_neutral_metric); |
| 185 | } |
| 186 | }; |
| 187 | |
| 188 |
nothing calls this directly
no test coverage detected