从R&D Mag –开发一个潜在的拯救生命的数学工具- :

Math and medicine are coming together to help people who have suffered an abdominal aortic aneurysm, which with 15,000 is the 13th-leading cause of death in the United States.

At the heart of the effort are genetic algorithms written by Oak Ridge National Laboratory researchers that allow physicians to more efficiently assess and organize the often vast amounts of information contained in patient reports. Ultimately, with this tool—a sophisticated way to quickly extract key phrases—doctors will be able to characterize features and findings in reports and provide better patient care.




toggleSign up now!View the newsletter sample.


Darwin on the track

The Economistarticle:

WHILE watching the finale of the Formula One grand-prix season on television last weekend, your correspondent could not help thinking how Darwinian motor racing has become. Each year, the FIA, the international motor sport’s governing body, sets new design rules in a bid to slow the cars down, so as to increase the amount of overtaking during a race—and thereby make the event more interesting to spectators and television viewers alike. The aim, of course, is to keep the admission and television fees rolling in. Over the course of a season, Formula One racing attracts a bigger audience around the world than any other sport.

Read the这里全文

Meanwhile, at the Hall of Justice!



WASHINGTON, Oct. 5 — Criminals are having a harder time hiding their faces, thanks to new software that helps witnesses recreate and recognize suspects using principles borrowed from the fields of optics and genetics.



“Over a number of generations, the computer can learn what face you’re looking for,” says Solomon.

Read the这里全文


Last night I’ve阅读后书签交易马修·罗林斯示出在Python代码来解决Eight Queenspuzzle using EA. So I decided to implement it in Python again but this time using Pyevolve, here is the code:

从pyevolve进口*从随机导入洗牌BOARD_SIZE = 64 DEF queens_eval(基因组):碰撞= 0对于i在x范围(0,BOARD_SIZE):如果我不在基因组:在x范围对于i返回0(0,BOARD_SIZE):山口=False for j in xrange(0, BOARD_SIZE): if (i != j) and (abs(i-j) == abs(genome[j]-genome[i])): col = True if col == True: collisions +=1 return BOARD_SIZE-collisions def queens_init(genome, **args): genome.genomeList = range(0, BOARD_SIZE) shuffle(genome.genomeList) def run_main(): genome = G1DList.G1DList(BOARD_SIZE) genome.setParams(bestrawscore=BOARD_SIZE, rounddecimal=2) genome.initializator.set(queens_init) genome.mutator.set(Mutators.G1DListMutatorSwap) genome.crossover.set(Crossovers.G1DListCrossoverCutCrossfill) genome.evaluator.set(queens_eval) ga = GSimpleGA.GSimpleGA(genome) ga.terminationCriteria.set(GSimpleGA.RawScoreCriteria) ga.setMinimax(Consts.minimaxType["maximize"]) ga.setPopulationSize(100) ga.setGenerations(5000) ga.setMutationRate(0.02) ga.setCrossoverRate(1.0) # This DBAdapter is to create graphs later, it'll store statistics in # a SQLite db file sqlite_adapter = DBAdapters.DBSQLite(identify="queens") ga.setDBAdapter(sqlite_adapter) ga.evolve(freq_stats=10) best = ga.bestIndividual() print best print "\nBest individual score: %.2f\n" % (best.score,) if __name__ == "__main__": run_main()

It tooks 49 generations to solve a 64×64 (4.096 chess squares) chessboard, here is the output:


And here is the plots generated by the Graph Plot Tool of Pyevolve:





Genetic Programming meets Python

我很自豪地宣布,Pyevolve的新版本将有Genetic Programmingsupport; after some time fighting with these evil syntax trees, I think I have a very easy and flexible implementation of GP in Python. I was tired to see people giving up and trying to learn how to implement a simple GP using the hermetic libraries for C/C++ and Java (unfortunatelly I’m a Java web developer hehe).

The implementation is still under some tests and optimization, but it’s working nice, here is some details about it:

The implementation has been done inpure Python, so we still have many bonus from this, but unfortunatelly we lost some performance.

该GP的核心是非常非常灵活,因亚洲金博宝为它Compiles the GP Trees in Python bytecodesto speed the execution of the function. So, you can use even Python objects as terminals, or any possible Python expression. Any Python function can be used too, and you can use all power of Python to create those functions, which will be automatic detected by the framework using the name prefix =)


Here is a source-code example:

从进口pyevolve *进口数学error_accum = Util.ErrorAccumulator()#这是所使用的GP核心,#Pyevolve会自动检测到它们#的功能和它们的数量DEF gp_add(A,B)的参数:返回A + B DEFgp_sub(a, b): return a-b def gp_mul(a, b): return a*b def gp_sqrt(a): return math.sqrt(abs(a)) def eval_func(chromosome): global error_accum error_accum.reset() code_comp = chromosome.getCompiledCode() for a in xrange(0, 5): for b in xrange(0, 5): # The eval will execute a pre-compiled syntax tree # as a Python expression, and will automatically use # the "a" and "b" variables (the terminals defined) evaluated = eval(code_comp) target = math.sqrt((a*a)+(b*b)) error_accum += (target, evaluated) return error_accum.getRMSE() def main_run(): genome = GTree.GTreeGP() genome.setParams(max_depth=5, method="ramped") genome.evaluator.set(eval_func) ga = GSimpleGA.GSimpleGA(genome) # This method will catch and use every function that # begins with "gp", but you can also add them manually. # The terminals are Python variables, you can use the # ephemeral random consts too, using ephemeral:random.randint(0,2) # for example. ga.setParams(gp_terminals = ['a', 'b'], gp_function_prefix = "gp") # You can even use a function call as terminal, like "func()" # and Pyevolve will use the result of the call as terminal ga.setMinimax(Consts.minimaxType["minimize"]) ga.setGenerations(1000) ga.setMutationRate(0.08) ga.setCrossoverRate(1.0) ga.setPopulationSize(2000) ga.evolve(freq_stats=5) print ga.bestIndividual() if __name__ == "__main__": main_run()


And of course, everything in Pyevolve can be visualized any time you want (click to enlarge):




@ GTree.gpdec(表示= “+”,颜色= “红”)DEF gp_add(A,B):返回A + B





从the article of



例如,如果肌肉连接到的大腿骨Tyrannosaurus rex较短,那就表明它在人类垂直角度。但是,如果他们是很长的,它可能是水平角度为鸟亚洲金博宝类。


初步尝试随机破译其中的肌肉激活的模式效果最好的结果几乎总是在动物落在它的脸上,解释计算机古生物学家彼得Falkingham在曼彻斯特大学。但科学家们采用“遗传算法”,或Computer programs that can alter themselves and evolve, and so run pattern after pattern until they get improvements.


Read the全文