|
QDpy
|
Self-play illumination and cross-play response tables for ad hoc cooperation. More...
Go to the source code of this file.
Classes | |
| class | qdpy.algorithms.adhoc_cooperation.CooperativeQDResult |
| Self-play repertoire and separate policy and match counts. More... | |
| class | qdpy.algorithms.adhoc_cooperation.PartnerResponseTable |
| Snapshot of ordered cross-play and the response to each partner niche. More... | |
Namespaces | |
| namespace | qdpy |
Functions | |
| qdpy.algorithms.adhoc_cooperation.cooperative_map_elites (archive, play, *, sample, mutate, budget, repeats=1, initial_samples=16, seed=0) | |
| Collect diverse cooperative policies using self-play. | |
| qdpy.algorithms.adhoc_cooperation.build_partner_responses (archive, play, *, budget, repeats=1, seed=0) | |
| Calibrate the best generalist and one response per partner niche. | |
Self-play illumination and cross-play response tables for ad hoc cooperation.
Definition in file adhoc_cooperation.py.
| qdpy.algorithms.adhoc_cooperation.build_partner_responses | ( | archive, | |
| play, | |||
| * | , | ||
| budget, | |||
| repeats = 1, | |||
| seed = 0 ) |
Calibrate the best generalist and one response per partner niche.
| archive | Nonempty self-play repertoire. |
| play | Callable (first_genome, second_genome, seed) returning (team_score, first_descriptor). |
| budget | Hard cap. Every ordered pair and repeat must fit before starting. |
| repeats | Number of common seeded matches per ordered pair. |
| seed | Cross-play seed, independent of self-play. |
Score all ordered pairings and choose responses with maximum cooperative return.
Definition at line 108 of file adhoc_cooperation.py.
| qdpy.algorithms.adhoc_cooperation.cooperative_map_elites | ( | archive, | |
| play, | |||
| * | , | ||
| sample, | |||
| mutate, | |||
| budget, | |||
| repeats = 1, | |||
| initial_samples = 16, | |||
| seed = 0 ) |
Collect diverse cooperative policies using self-play.
| archive | Empty parentless, best-only Grid or CVTGrid with one objective. |
| play | Callable (first_genome, second_genome, seed) returning (team_score, first_descriptor). |
| sample | Callable (rng) returning an initial policy genome. |
| mutate | Callable (genome, rng) returning an offspring. |
| budget | Number of evaluated policy genomes. |
| repeats | Number of common seeded matches per candidate. |
| initial_samples | Number of unconditional sample calls. |
| seed | Root variation and matchup seed. |
Measure each candidate against itself and admit by its measured behavior.
Definition at line 72 of file adhoc_cooperation.py.