-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign.txt
192 lines (133 loc) · 4.18 KB
/
design.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
This is a very informal design document :D
Parts of power grid:
Resource Pool
a: Resource Type
a: Total Resources
a: Resources available
m: Buy resources
m: Replenish resources
m: Get available resources to buy
Resource Market
a: Oil Resource Pool
a: Coal Resource Pool
a: Trash Resource Pool
a: Uranium Resource Pool
m: Buy resources
m: Replenish resources
m: Get available resources
Resource type
-> Coal
-> Oil
-> Trash
-> Uranium
-> Renewable
Board:
-> City Graph
-> Area Graph
-> Player Order
-> Player-City mapping
Player Board:
Although in PowerGrid, a player does not have a specific board that is theirs,
like in Viticulture, there is undeniably a board state for each player. For
the purposes of our initial analysis, this board is all we really need.
Everything else will be strategy. The board, for example, is not allowed to see
what the actual/future markets are. That is the job of the intelligence behind
the board.
In this manner, I again try to separate policy from mechanism.
a: Cities owned
a: Plants owned
a: Current elektro
a: Max plants allowed
m: Get number of cities
m: Remove elektro
Phase 2: Auction Power Plants
m: Get power plants
m: Add plant to board
m: Replace plant
Phase 3: Buying Resources
m: Get resources on each plant
m: Add resources to plant
Phase 4: Building
m: Add cities to network
Phase 5: Bureaucracy
m: Remove resources from plant
m: Get elektro for plants powered
Player:
Note, starred items are strategies.
As awkward as it is, the player needs references to the resource market,
the plant market, the board, and the moderator.
They won't have access to the important functions.
It's important to note the distinction between a player's board state and
the actual player intelligence. This class sort of melds both together
because it is difficult to separate the two. For example, the player's
board state will have the number of plants, the plants, the resources, etc.
But it won't do any of the strategy. That, in the analysis case, is the job
of the simulator, but eventually will be the job of the AI.
As with everything else, it will not be up to the user to determine the policy.
Only the mechanism.
One of the problems
a: Cities owned
a: Plants owned
a: Current elektro
a: Max plants allowed
a: Total money spent in round
a: Total money earned in round
m: Reset money spent/earned
Phase 1: Determine player order
m: Get number of cities
Phase 2: Auction Power Plants
a: Plant purchased this round
a: Money spent on plant
m: Should I try to buy a plant?*
m: See actual market
m: See future market
m: Auction plant
m: Bid for plant
m: Pass
Phase 3: Buying Resources
a: Money spent on resources
m: Check needed resources based on plants
m: Buy resources
m: Determine cost of resources vs. money from cities*
Phase 4: Building
a: Money spent on cities
m: Buy cities
Phase 5: Bureaucracy
a: Money earned
m: Determine cities to power*
m: Power cities
m: Get money from powering cities
m: Calculate the amount of money from powering plants*
-> Strategize
Stratagem:
Strategy:
-> Relevant phases
-> Relevant round
-> Needs board state
-> Create adjustment factor
Plant Market
-> Current Market
-> Plants
-> Future Market
-> Plants
-> Game Phase
Moderator
a: Player list
a: Power Plant Deck
a: Resource Market
a: Plant Market
a: Player order
-> Shuffle deck
-> Replenish markets
-> Remove Plant
-> Add Plant
-> Check for next phase
Initial algorithm:
1. Create players
2. Shuffle plants
3. Generate market
4. Fill resources
5. Determine player order
6.
How much should a player pay for a plant in an auction?
-