演化仿真引擎 Evolve

码农软件 · 软件分类 · 其他(Others) · 2019-07-20 18:14:19

软件介绍

Evolve 是一个用 Objective-C 编写的演化仿真引擎。

示例代码:

- (void)evaluateFitnessForPopulation {    
NSArray *organisms = self.evolutionManager.population.organisms;    
for (Organism *organism in organisms) {        
   NSString *genomeString = organism.genome.sequence;        
   NSInteger geneSequenceLength = genomeString.length;        
   NSInteger correctCharacters = 0;        
   for (NSInteger charIndex = 0; 
      charIndex < geneSequenceLength; charIndex++) {            
      if ([genomeString characterAtIndex:charIndex] 
      == [kTargetString characterAtIndex:charIndex]) {
                correctCharacters++;
            }
        }

        organism.fitness = correctCharacters;
    }
}

本文地址:https://www.codercto.com/soft/d/10565.html

Web Design DeMYSTiFieD

Web Design DeMYSTiFieD

Willard, Wendy / 2010-11 / $ 24.86

Website Design just got a whole lot easier! This title helps you to learn the latest website development tools, techniques, and best practices. "Web Design Demystified" provides the hands-on help you ......一起来看看 《Web Design DeMYSTiFieD》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具