Skip to Content
复杂性思考:复杂性科学和计算模型(原书第2 版)
book

复杂性思考:复杂性科学和计算模型(原书第2 版)

by Allen B. Downey
March 2020
Intermediate to advanced
200 pages
3h 12m
Chinese
China Machine Press
Content preview from 复杂性思考:复杂性科学和计算模型(原书第2 版)
182
12
12.9 练习
本章的代码位于本书代码库中的 Jupyter 笔记本 chap12.ipynb 中。打开笔
记本,阅读代码,然后运行。你可以使用此笔记本进行以下练习。我的解决
方案在 chap12soln.ipynb 中。有关使用此代码的详细信息,请参阅前言 
中的“使用代码”一节。
练习 12-1
本章的模拟依赖于我通常选择的条件和参数。作为练习,我鼓励你探索
其他条件,看看它们对结果有什么影响。以下是一些建议:
1. 改变初始条件:不要从所有叛变者开始,如果从所有合作者、所有 TFT
或随机智能体开始,看看会发生什么。
2. 在 Tournament.melee 中,我在每个时间步开始时洗牌智能体,因此
每个智能体将与两个随机选择的智能体进行比赛。如果你不洗牌会发生
什么?在这种情况下,每个智能体重复地与相同的邻居竞争。这可能会
使少数智能体的策略更容易通过利用地方优势,入侵多数智能体。
3. 由于每个智能体只与其他两个智能体竞争,所以每轮的结果都是高度可
变的:在任何给定的轮中,能够与大多数其他智能体竞争得很好的智能
体可能会在任何一轮中运气不佳,反之亦然。如果在每一轮中增加每
个智能体的对手数量会发生什么?或者,如果一个智能体在每一步结
束时的适应度是当前得分和前一轮结束时的适应度的平均值,那么该
怎么办?
4. 我为 prob_survival 选择的函数从 0.7 0.9 不等,所以最不合适的
智能体平均生存 3.33 个时间步长,此时 p=0.7 ;最合适的智能体平均生
10 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

数据驱动力:企业数据分析实战

数据驱动力:企业数据分析实战

Carl Anderson
精通模块化JavaScript

精通模块化JavaScript

Nicolás Bevacqua
流畅的Python

流畅的Python

Luciano Ramalho

Publisher Resources

ISBN: 9787111647348