二元函数为y=x1^2+x2^2,x∈[-5,5]
NIND=121; %初始种群的个数(Number of individuals)
NVAR=2; %一个染色体(个体)有多少基因
PRECI=20; %变量的二进制位数(Precision of variables)
MAXGEN=200; %最大遗传代数(Maximum number of generations)
GGAP=0.8; %代沟(Generation gap),以一定概率选择父代遗传到下一代
trace=zero
这次的shell案例比较简单,但有其特点。
#!/bin/sh
# scr iptbc - Wrapper for 'bc' that returns the result of a calculation.
if [ $1 = -p ] ; then
precision=$2
shift 2
else
precision=2 # default
fi
bc -q << EOF
scale=$precision
$*
quit
EOF
exit 0
脚本特点:
1)
asset store官网的插件:
Get to know the power of Unity 4's character animation system, Mecanim, with this comprehensive example package.
Inside, you'll find eleven example scenes demonstrating locomotion state machines, animation blend trees, crowd simula