Alterna · учебный материал

EGE 19-21: Game theory

EGE Computer Trainer: 19th, 20th, 21st, game theory, winning and losing positions.

Что в этом материале

Содержание и основные понятия

Back to the table of contents
Alterna · Chapter 25 · page 25.5
EGE 19-21: Game theory
A generator of random versions of auto-check game theory, every time a new condition.
Two players go in turn using authorized transactions as a number.
Wins.
Objective: To find winning and losing entry points.
GEF
EEG No. 19
EEG No. 20
EGE No. 21
01
Options for option
⚙️
Game Options
Type of transactions
Border value N
02
Condition of the task
📊
Table of entries
The Winner (B) — The First Walking, He Wins
The Winner (P) is the first to go, and he loses.
Boundary N - automatically wins
Press the cell to see the explanation.
0/3
Correct answers in this option
03
How do I decide?
The losing position algorithm:
Positions
≥ N
(border) -
Winners
(you've already won)
Position
lost
if
All
The moves from it lead to a winning position.
Position
Winner
if
Just one.
The move leads to a losing position.
Fill out the table from N-1 downwards (or 1 up for downcoming games).
What do they ask:
Job 19
- maximum loser position (second wins in optimal game).
Job 20
- all starting positions within [a, b] from which
Second
The player wins.
Job 21
= maximum position in the range [a, b] with
First
The player wins.
04
BST Designer
Enter the keys — build the tree, watch the rounds, remove the nodes.
🌳
BST Constructor
Key
The tree is empty - insert the first key
How BST works:
• The root is the first key inserted.
• The smaller key is left-hand support, the larger one is right-hand.
• Inorder bypass gives a sorted sequence!
• Removal of the node with two children: replace the minimum right support.

Structural map of textbooks