SDS Library
Andrew Owen Martin
3 May 2020
Contents
1 Standard SDS 4
1.1 SDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2.1 Unit test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Swarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Modes of iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Modes of diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.1 Diffusion with noisy hypothesis transmission . . . . . . . . . . . 14
1.6 Modes of hypothesis selection . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.7 Modes of testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.8 Modes of microtest selection . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.9 Modes of halting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.9.1 Halting combinators . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.10 Modes of extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2 Reducing SDS 27
2.0.1 Agent and Swarm subclasses . . . . . . . . . . . . . . . . . . . . . 35
2
3 May 2020 3
A Files 40
A.1 standard.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
A.2 variants.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
A.3 reducing.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
A.4 init .py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
A.5 test-sds.py . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
B Indices 44
B.1 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
B.2 Code Chunks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3 May 2020 sds.nw 5
1.2 Agent
5 hstandard agent 5i≡
class Agent
5
:
def __init__(self, active=False, hyp=None):
self.active = active
self.hyp = hyp
@property
def inactive(self):
return not self.active
@property
def clone(self):
return ReadOnlyAgent(active=self.active, hyp=self.hyp)
def __iter__(self):
yield ("active", self.active)
yield ("hyp", self.hyp)
def __str__(self):
if self.active:
return str(self.hyp)
else:
return "Inactive"
This code is used in chunk 40.
Defines:
Agent, used in chunks 6, 7, 35a, and 42a.