ads2_2022/code/python/assets/commands.yaml

201 lines
4.3 KiB
YAML

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# NOTE:
# Diese Datei enthält Angaben für konkrete Fälle
# für die zu demonstrierenden Algorithmen.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Beispiele für Seminarwoche 2 (Blatt 1)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- name: TARJAN
nodes: [a,b,c]
edges: [[a, c], [c, a], [b, c]]
- name: TARJAN
nodes: [1, 2, 3, 4, 5, 6, 7, 8]
edges: [
[1, 2],
[1, 3],
[2, 4],
[2, 5],
[3, 5],
[3, 6],
[3, 8],
[4, 5],
[4, 7],
[5, 1],
[5, 8],
[6, 8],
[7, 8],
[8, 6],
]
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Beispiele für Seminarwoche 9 (Blatt 8)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- name: TSP
dist: &ref_dist [
[0, 7, 4, 3],
[7, 0, 5, 6],
[2, 5, 0, 5],
[2, 7, 4, 0],
]
optimise: MIN
- name: TSP
dist: *ref_dist
optimise: MAX
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Beispiele für Seminarwoche 10 (Blatt 9)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- name: HIRSCHBERG
word1: 'happily ever after'
word2: 'apples'
once: false
- name: HIRSCHBERG
word1: 'happily'
word2: 'applses'
once: false
- name: HIRSCHBERG
word1: 'happily ever, lol'
word2: 'apple'
once: false
- name: HIRSCHBERG
word1: 'ACGAAG'
word2: 'AGAT'
once: false
- name: HIRSCHBERG
word1: 'ANSTRENGEN'
word2: 'ANSPANNEN'
once: false
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Beispiele für Seminarwoche 11 (Blatt 10)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- name: RUCKSACK
algorithm: GREEDY
allow-fractional: true
# allow-fractional: false
max-cost: 10
items: [a, b, c, d, e]
costs:
[3, 4, 5, 2, 1]
values:
[8, 7, 8, 3, 2]
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
max-cost: 10
items: [a, b, c, d, e]
costs: [3, 4, 5, 2, 1]
values: [8, 7, 8, 3, 2]
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
max-cost: 460
items: [
'Lakritze',
'Esspapier',
'Gummibärchen',
'Schokolade',
'Apfelringe',
]
costs: [220, 80, 140, 90, 100]
values: [100, 10, 70, 80, 100]
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
max-cost: 90
items: [
'Sonnenblumenkerne',
'Buchweizen',
'Rote Beete',
'Hirse',
'Sellerie',
]
costs: [30, 10, 50, 10, 80]
values: [17, 14, 17, 5, 25]
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
max-cost: 900
items: [
'Sellerie',
'Sonnenblumenkerne',
'Rote Beete',
'Hirse',
'Buchweizen',
]
costs: [600, 100, 800, 100, 200]
values: [10, 15, 20, 5, 15]
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Beispiele für Seminarwoche 12
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- name: RANDOM-WALK
algorithm: GRADIENT
one-based: true
coords-init: [3, 3]
landscape: &ref_landscape1
neighbourhoods:
radius: 1
# metric: MANHATTAN
metric: MAXIMUM
labels:
- x
- y
values:
- [5, 2, 1, 3, 4, 7]
- [8, 4, 3, 5, 5, 6]
- [9, 1, 2, 6, 8, 4]
- [7, 4, 4, 3, 7, 3]
- [6, 4, 2, 1, 0, 7]
- [4, 3, 5, 2, 1, 8]
optimise: MAX
- name: RANDOM-WALK
algorithm: ADAPTIVE
one-based: true
coords-init: [3, 3]
landscape: *ref_landscape1
optimise: MAX
- name: RANDOM-WALK
algorithm: METROPOLIS
annealing: false
temperature-init: 3.
one-based: true
coords-init: [5, 3]
landscape: *ref_landscape1
optimise: MAX
- name: RANDOM-WALK
algorithm: METROPOLIS
annealing: false
temperature-init: 3.
one-based: false
coords-init: [0]
landscape:
neighbourhoods:
radius: 1
metric: MANHATTAN
labels:
- x
values: [4, 6.5, 2]
optimise: MAX
- name: GENETIC
population:
- [3, 5, 4, 1, 6, 7, 2, 8, 9]
- [4, 5, 3, 2, 1, 6, 7, 8, 9]
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Beispiele für Seminarwoche 13
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- name: EUKLID
numbers:
- 2017
- 58
- name: POLLARD-RHO
growth: LINEAR
# growth: EXPONENTIAL
number: 534767
x-init: 5