摘要: 首先设定初始随机种群数目,然后让虾群自动繁殖,最后就可以得出虾群的最终种群数目。例如设定初始的种群数目为20,最终在繁殖后得到的种群数目为35。 import random class Shrimp(): def __init__(self, pos, mapSize): # The positio 阅读全文
posted @ 2023-01-14 22:39 tiansz 阅读(53) 评论(0) 推荐(0)