client_plugin_logic_deb 1.8.475 → 1.8.476
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1 -1
- package/Logic_Debertz-ai_module.js +283 -283
- package/Logic_Debertz-bot_engine.js +744 -744
- package/Logic_Debertz-bot_engine.js.map +1 -1
- package/Logic_Debertz-client_plugin.d.ts +21 -12
- package/Logic_Debertz-client_plugin.js +2087 -2087
- package/Logic_Debertz-core.js +523 -679
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +12758 -12493
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.js +6842 -6842
- package/Logic_Debertz-game_client.js.map +1 -1
- package/Logic_Debertz-game_server.js +1254 -1224
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlinx-coroutines-core.js +8 -8
- package/kotlinx-coroutines-core.js.map +1 -1
- package/package.json +1 -1
|
@@ -68,38 +68,38 @@
|
|
|
68
68
|
var getPlayer = kotlin_io_raspberryapps_game_engine_core.$_$.q;
|
|
69
69
|
var addAll = kotlin_kotlin.$_$.d6;
|
|
70
70
|
var listOf = kotlin_kotlin.$_$.v8;
|
|
71
|
-
var CombinationState_ACCEPTED_getInstance = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
72
|
-
var get_isEarnPointScene = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
71
|
+
var CombinationState_ACCEPTED_getInstance = kotlin_io_raspberryapps_game_engine_engine.$_$.ba;
|
|
72
|
+
var get_isEarnPointScene = kotlin_io_raspberryapps_game_engine_engine.$_$.a4;
|
|
73
73
|
var plus = kotlin_kotlin.$_$.k9;
|
|
74
|
-
var get_isTradeScene = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
74
|
+
var get_isTradeScene = kotlin_io_raspberryapps_game_engine_engine.$_$.d4;
|
|
75
75
|
var listOf_0 = kotlin_kotlin.$_$.w8;
|
|
76
76
|
var noWhenBranchMatchedException = kotlin_kotlin.$_$.dk;
|
|
77
|
-
var CombinationChoiceFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
78
|
-
var CardFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
79
|
-
var SuitChoiceFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
80
|
-
var filterWithFirstCardCombination = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
81
|
-
var CombinationState_NOT_VERIFIED_getInstance = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
82
|
-
var filterByCombinationState = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
77
|
+
var CombinationChoiceFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.h5;
|
|
78
|
+
var CardFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.g5;
|
|
79
|
+
var SuitChoiceFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.p5;
|
|
80
|
+
var filterWithFirstCardCombination = kotlin_io_raspberryapps_game_engine_engine.$_$.t3;
|
|
81
|
+
var CombinationState_NOT_VERIFIED_getInstance = kotlin_io_raspberryapps_game_engine_engine.$_$.da;
|
|
82
|
+
var filterByCombinationState = kotlin_io_raspberryapps_game_engine_engine.$_$.q3;
|
|
83
83
|
var CardName_KING_getInstance = kotlin_io_raspberryapps_cardgame_core.$_$.d;
|
|
84
84
|
var CardName_QUEEN_getInstance = kotlin_io_raspberryapps_cardgame_core.$_$.f;
|
|
85
|
-
var CombinationState_REJECTED_getInstance = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
86
|
-
var CombinationType_BELA_getInstance = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
87
|
-
var filterByCombinationType = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
85
|
+
var CombinationState_REJECTED_getInstance = kotlin_io_raspberryapps_game_engine_engine.$_$.ea;
|
|
86
|
+
var CombinationType_BELA_getInstance = kotlin_io_raspberryapps_game_engine_engine.$_$.fa;
|
|
87
|
+
var filterByCombinationType = kotlin_io_raspberryapps_game_engine_engine.$_$.r3;
|
|
88
88
|
var plus_0 = kotlin_kotlin.$_$.j9;
|
|
89
|
-
var mapFromDetailed = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
89
|
+
var mapFromDetailed = kotlin_io_raspberryapps_game_engine_engine.$_$.v3;
|
|
90
90
|
var WaitingActData = kotlin_io_raspberryapps_game_engine_engine.$_$.q1;
|
|
91
91
|
var getKClass = kotlin_kotlin.$_$.mf;
|
|
92
92
|
var MechanicException = kotlin_io_raspberryapps_game_engine_core.$_$.b;
|
|
93
|
-
var Companion_instance = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
94
|
-
var RequestedCardDecksFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
93
|
+
var Companion_instance = kotlin_io_raspberryapps_game_engine_engine.$_$.nb;
|
|
94
|
+
var RequestedCardDecksFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.o5;
|
|
95
95
|
var CardDeckRequest = kotlin_io_raspberryapps_game_engine_engine.$_$.p1;
|
|
96
|
-
var PartnerSelectedFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
96
|
+
var PartnerSelectedFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.m5;
|
|
97
97
|
var CalcPointsSceneData = kotlin_io_raspberryapps_game_engine_engine.$_$.k1;
|
|
98
|
-
var ExitFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
99
|
-
var PlayerReadyFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
100
|
-
var get_isCalcPointScene = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
101
|
-
var get_isChoosePartnerScene = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
102
|
-
var ExternalBotAnswerProvider = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
98
|
+
var ExitFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.i5;
|
|
99
|
+
var PlayerReadyFromClientAction = kotlin_io_raspberryapps_game_engine_engine.$_$.n5;
|
|
100
|
+
var get_isCalcPointScene = kotlin_io_raspberryapps_game_engine_engine.$_$.y3;
|
|
101
|
+
var get_isChoosePartnerScene = kotlin_io_raspberryapps_game_engine_engine.$_$.z3;
|
|
102
|
+
var ExternalBotAnswerProvider = kotlin_io_raspberryapps_game_engine_engine.$_$.l8;
|
|
103
103
|
var Enum = kotlin_kotlin.$_$.ti;
|
|
104
104
|
var max = kotlin_kotlin.$_$.b9;
|
|
105
105
|
var sum = kotlin_kotlin.$_$.ba;
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
var random = kotlin_kotlin.$_$.m9;
|
|
109
109
|
var setOf = kotlin_kotlin.$_$.t9;
|
|
110
110
|
var setOf_0 = kotlin_kotlin.$_$.u9;
|
|
111
|
-
var getGrowth =
|
|
111
|
+
var getGrowth = kotlin_io_raspberryapps_game_engine_engine.$_$.n3;
|
|
112
112
|
var compareTo = kotlin_kotlin.$_$.ed;
|
|
113
113
|
var Default_getInstance = kotlin_kotlin.$_$.x4;
|
|
114
114
|
var getNumberHashCode = kotlin_kotlin.$_$.kd;
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
var toMutableList = kotlin_kotlin.$_$.pa;
|
|
121
121
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.o1;
|
|
122
122
|
var ensureNotNull = kotlin_kotlin.$_$.wj;
|
|
123
|
-
var getPoint =
|
|
123
|
+
var getPoint = kotlin_io_raspberryapps_game_engine_engine.$_$.o3;
|
|
124
124
|
var Companion_instance_0 = kotlin_io_raspberryapps_cardgame_core.$_$.n;
|
|
125
125
|
var get_indices_0 = kotlin_kotlin.$_$.h8;
|
|
126
126
|
var toList = kotlin_kotlin.$_$.ja;
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
var toMutableMap = kotlin_kotlin.$_$.qa;
|
|
146
146
|
var objectCreate = kotlin_kotlin.$_$.oe;
|
|
147
147
|
var numberToInt = kotlin_kotlin.$_$.ne;
|
|
148
|
-
var HandStrengthCalculatorImpl = kotlin_io_raspberryapps_game_engine_engine.$_$.
|
|
148
|
+
var HandStrengthCalculatorImpl = kotlin_io_raspberryapps_game_engine_engine.$_$.z4;
|
|
149
149
|
var firstOrNull = kotlin_kotlin.$_$.v7;
|
|
150
150
|
//endregion
|
|
151
151
|
//region block: pre-declaration
|
|
@@ -209,15 +209,15 @@
|
|
|
209
209
|
function PlayCard(card, combinations) {
|
|
210
210
|
combinations = combinations === VOID ? null : combinations;
|
|
211
211
|
BotAction.call(this);
|
|
212
|
-
this.
|
|
213
|
-
this.
|
|
212
|
+
this.eb5_1 = card;
|
|
213
|
+
this.fb5_1 = combinations;
|
|
214
214
|
}
|
|
215
215
|
protoOf(PlayCard).toString = function () {
|
|
216
|
-
return 'PlayCard(card=' + this.
|
|
216
|
+
return 'PlayCard(card=' + this.eb5_1.toString() + ', combinations=' + toString(this.fb5_1) + ')';
|
|
217
217
|
};
|
|
218
218
|
protoOf(PlayCard).hashCode = function () {
|
|
219
|
-
var result = this.
|
|
220
|
-
result = imul(result, 31) + (this.
|
|
219
|
+
var result = this.eb5_1.hashCode();
|
|
220
|
+
result = imul(result, 31) + (this.fb5_1 == null ? 0 : hashCode(this.fb5_1)) | 0;
|
|
221
221
|
return result;
|
|
222
222
|
};
|
|
223
223
|
protoOf(PlayCard).equals = function (other) {
|
|
@@ -225,47 +225,47 @@
|
|
|
225
225
|
return true;
|
|
226
226
|
if (!(other instanceof PlayCard))
|
|
227
227
|
return false;
|
|
228
|
-
if (!this.
|
|
228
|
+
if (!this.eb5_1.equals(other.eb5_1))
|
|
229
229
|
return false;
|
|
230
|
-
if (!equals(this.
|
|
230
|
+
if (!equals(this.fb5_1, other.fb5_1))
|
|
231
231
|
return false;
|
|
232
232
|
return true;
|
|
233
233
|
};
|
|
234
234
|
function SelectSuit(suit) {
|
|
235
235
|
BotAction.call(this);
|
|
236
|
-
this.
|
|
236
|
+
this.gb5_1 = suit;
|
|
237
237
|
}
|
|
238
238
|
protoOf(SelectSuit).toString = function () {
|
|
239
|
-
return 'SelectSuit(suit=' + toString(this.
|
|
239
|
+
return 'SelectSuit(suit=' + toString(this.gb5_1) + ')';
|
|
240
240
|
};
|
|
241
241
|
protoOf(SelectSuit).hashCode = function () {
|
|
242
|
-
return this.
|
|
242
|
+
return this.gb5_1 == null ? 0 : this.gb5_1.hashCode();
|
|
243
243
|
};
|
|
244
244
|
protoOf(SelectSuit).equals = function (other) {
|
|
245
245
|
if (this === other)
|
|
246
246
|
return true;
|
|
247
247
|
if (!(other instanceof SelectSuit))
|
|
248
248
|
return false;
|
|
249
|
-
if (!equals(this.
|
|
249
|
+
if (!equals(this.gb5_1, other.gb5_1))
|
|
250
250
|
return false;
|
|
251
251
|
return true;
|
|
252
252
|
};
|
|
253
253
|
function AcceptCombinations(isAccepted) {
|
|
254
254
|
BotAction.call(this);
|
|
255
|
-
this.
|
|
255
|
+
this.hb5_1 = isAccepted;
|
|
256
256
|
}
|
|
257
257
|
protoOf(AcceptCombinations).toString = function () {
|
|
258
|
-
return 'AcceptCombinations(isAccepted=' + this.
|
|
258
|
+
return 'AcceptCombinations(isAccepted=' + this.hb5_1 + ')';
|
|
259
259
|
};
|
|
260
260
|
protoOf(AcceptCombinations).hashCode = function () {
|
|
261
|
-
return getBooleanHashCode(this.
|
|
261
|
+
return getBooleanHashCode(this.hb5_1);
|
|
262
262
|
};
|
|
263
263
|
protoOf(AcceptCombinations).equals = function (other) {
|
|
264
264
|
if (this === other)
|
|
265
265
|
return true;
|
|
266
266
|
if (!(other instanceof AcceptCombinations))
|
|
267
267
|
return false;
|
|
268
|
-
if (!(this.
|
|
268
|
+
if (!(this.hb5_1 === other.hb5_1))
|
|
269
269
|
return false;
|
|
270
270
|
return true;
|
|
271
271
|
};
|
|
@@ -278,57 +278,57 @@
|
|
|
278
278
|
trumpTakenInFirstCircle = trumpTakenInFirstCircle === VOID ? null : trumpTakenInFirstCircle;
|
|
279
279
|
trumpDeclarerId = trumpDeclarerId === VOID ? null : trumpDeclarerId;
|
|
280
280
|
handSize = handSize === VOID ? 8 : handSize;
|
|
281
|
-
this.
|
|
282
|
-
this.
|
|
283
|
-
this.
|
|
284
|
-
this.
|
|
285
|
-
this.
|
|
286
|
-
this.
|
|
287
|
-
this.
|
|
288
|
-
this.
|
|
289
|
-
this.
|
|
290
|
-
this.
|
|
291
|
-
this.
|
|
292
|
-
this.
|
|
293
|
-
this.
|
|
294
|
-
this.
|
|
295
|
-
this.
|
|
296
|
-
this.
|
|
297
|
-
this.
|
|
298
|
-
this.
|
|
299
|
-
this.
|
|
300
|
-
this.
|
|
301
|
-
this.
|
|
302
|
-
this.
|
|
303
|
-
this.
|
|
281
|
+
this.ib5_1 = focalPlayerId;
|
|
282
|
+
this.jb5_1 = playerOrder;
|
|
283
|
+
this.kb5_1 = ownCards;
|
|
284
|
+
this.lb5_1 = playedCards;
|
|
285
|
+
this.mb5_1 = currentTrick;
|
|
286
|
+
this.nb5_1 = trump;
|
|
287
|
+
this.ob5_1 = trumpCard;
|
|
288
|
+
this.pb5_1 = isTrumpDeclarer;
|
|
289
|
+
this.qb5_1 = suitSelectionHistory;
|
|
290
|
+
this.rb5_1 = ownTeamScore;
|
|
291
|
+
this.sb5_1 = opponentTeamScore;
|
|
292
|
+
this.tb5_1 = ownRoundPoints;
|
|
293
|
+
this.ub5_1 = opponentRoundPoints;
|
|
294
|
+
this.vb5_1 = trickNumber;
|
|
295
|
+
this.wb5_1 = positionInTrick;
|
|
296
|
+
this.xb5_1 = ownTeamWonLastTrick;
|
|
297
|
+
this.yb5_1 = suitVoids;
|
|
298
|
+
this.zb5_1 = trumpTakenInFirstCircle;
|
|
299
|
+
this.ab6_1 = trumpDeclarerId;
|
|
300
|
+
this.bb6_1 = declaredCombinations;
|
|
301
|
+
this.cb6_1 = rules;
|
|
302
|
+
this.db6_1 = playersMode;
|
|
303
|
+
this.eb6_1 = handSize;
|
|
304
304
|
}
|
|
305
305
|
protoOf(BotGameState).toString = function () {
|
|
306
|
-
return 'BotGameState(focalPlayerId=' + this.
|
|
306
|
+
return 'BotGameState(focalPlayerId=' + this.ib5_1 + ', playerOrder=' + toString_0(this.jb5_1) + ', ownCards=' + toString_0(this.kb5_1) + ', playedCards=' + toString_0(this.lb5_1) + ', currentTrick=' + toString_0(this.mb5_1) + ', trump=' + toString(this.nb5_1) + ', trumpCard=' + toString(this.ob5_1) + ', isTrumpDeclarer=' + this.pb5_1 + ', suitSelectionHistory=' + toString_0(this.qb5_1) + ', ownTeamScore=' + this.rb5_1 + ', opponentTeamScore=' + this.sb5_1 + ', ownRoundPoints=' + this.tb5_1 + ', opponentRoundPoints=' + this.ub5_1 + ', trickNumber=' + this.vb5_1 + ', positionInTrick=' + this.wb5_1 + ', ownTeamWonLastTrick=' + this.xb5_1 + ', suitVoids=' + toString_0(this.yb5_1) + ', trumpTakenInFirstCircle=' + this.zb5_1 + ', trumpDeclarerId=' + this.ab6_1 + ', declaredCombinations=' + toString_0(this.bb6_1) + ', rules=' + this.cb6_1.toString() + ', playersMode=' + this.db6_1.toString() + ', handSize=' + this.eb6_1 + ')';
|
|
307
307
|
};
|
|
308
308
|
protoOf(BotGameState).hashCode = function () {
|
|
309
|
-
var result = getStringHashCode(this.
|
|
310
|
-
result = imul(result, 31) + hashCode(this.cb5_1) | 0;
|
|
311
|
-
result = imul(result, 31) + hashCode(this.db5_1) | 0;
|
|
312
|
-
result = imul(result, 31) + hashCode(this.eb5_1) | 0;
|
|
313
|
-
result = imul(result, 31) + hashCode(this.fb5_1) | 0;
|
|
314
|
-
result = imul(result, 31) + (this.gb5_1 == null ? 0 : this.gb5_1.hashCode()) | 0;
|
|
315
|
-
result = imul(result, 31) + (this.hb5_1 == null ? 0 : this.hb5_1.hashCode()) | 0;
|
|
316
|
-
result = imul(result, 31) + getBooleanHashCode(this.ib5_1) | 0;
|
|
309
|
+
var result = getStringHashCode(this.ib5_1);
|
|
317
310
|
result = imul(result, 31) + hashCode(this.jb5_1) | 0;
|
|
318
|
-
result = imul(result, 31) + this.kb5_1 | 0;
|
|
319
|
-
result = imul(result, 31) + this.lb5_1 | 0;
|
|
320
|
-
result = imul(result, 31) + this.mb5_1 | 0;
|
|
321
|
-
result = imul(result, 31) + this.nb5_1 | 0;
|
|
322
|
-
result = imul(result, 31) + this.ob5_1 | 0;
|
|
323
|
-
result = imul(result, 31) + this.pb5_1 | 0;
|
|
324
|
-
result = imul(result, 31) +
|
|
325
|
-
result = imul(result, 31) +
|
|
326
|
-
result = imul(result, 31) +
|
|
327
|
-
result = imul(result, 31) +
|
|
328
|
-
result = imul(result, 31) +
|
|
329
|
-
result = imul(result, 31) + this.vb5_1
|
|
330
|
-
result = imul(result, 31) + this.wb5_1
|
|
331
|
-
result = imul(result, 31) + this.xb5_1 | 0;
|
|
311
|
+
result = imul(result, 31) + hashCode(this.kb5_1) | 0;
|
|
312
|
+
result = imul(result, 31) + hashCode(this.lb5_1) | 0;
|
|
313
|
+
result = imul(result, 31) + hashCode(this.mb5_1) | 0;
|
|
314
|
+
result = imul(result, 31) + (this.nb5_1 == null ? 0 : this.nb5_1.hashCode()) | 0;
|
|
315
|
+
result = imul(result, 31) + (this.ob5_1 == null ? 0 : this.ob5_1.hashCode()) | 0;
|
|
316
|
+
result = imul(result, 31) + getBooleanHashCode(this.pb5_1) | 0;
|
|
317
|
+
result = imul(result, 31) + hashCode(this.qb5_1) | 0;
|
|
318
|
+
result = imul(result, 31) + this.rb5_1 | 0;
|
|
319
|
+
result = imul(result, 31) + this.sb5_1 | 0;
|
|
320
|
+
result = imul(result, 31) + this.tb5_1 | 0;
|
|
321
|
+
result = imul(result, 31) + this.ub5_1 | 0;
|
|
322
|
+
result = imul(result, 31) + this.vb5_1 | 0;
|
|
323
|
+
result = imul(result, 31) + this.wb5_1 | 0;
|
|
324
|
+
result = imul(result, 31) + getBooleanHashCode(this.xb5_1) | 0;
|
|
325
|
+
result = imul(result, 31) + hashCode(this.yb5_1) | 0;
|
|
326
|
+
result = imul(result, 31) + (this.zb5_1 == null ? 0 : getBooleanHashCode(this.zb5_1)) | 0;
|
|
327
|
+
result = imul(result, 31) + (this.ab6_1 == null ? 0 : getStringHashCode(this.ab6_1)) | 0;
|
|
328
|
+
result = imul(result, 31) + hashCode(this.bb6_1) | 0;
|
|
329
|
+
result = imul(result, 31) + this.cb6_1.hashCode() | 0;
|
|
330
|
+
result = imul(result, 31) + this.db6_1.hashCode() | 0;
|
|
331
|
+
result = imul(result, 31) + this.eb6_1 | 0;
|
|
332
332
|
return result;
|
|
333
333
|
};
|
|
334
334
|
protoOf(BotGameState).equals = function (other) {
|
|
@@ -336,66 +336,66 @@
|
|
|
336
336
|
return true;
|
|
337
337
|
if (!(other instanceof BotGameState))
|
|
338
338
|
return false;
|
|
339
|
-
if (!(this.
|
|
339
|
+
if (!(this.ib5_1 === other.ib5_1))
|
|
340
340
|
return false;
|
|
341
|
-
if (!equals(this.
|
|
341
|
+
if (!equals(this.jb5_1, other.jb5_1))
|
|
342
342
|
return false;
|
|
343
|
-
if (!equals(this.
|
|
343
|
+
if (!equals(this.kb5_1, other.kb5_1))
|
|
344
344
|
return false;
|
|
345
|
-
if (!equals(this.
|
|
345
|
+
if (!equals(this.lb5_1, other.lb5_1))
|
|
346
346
|
return false;
|
|
347
|
-
if (!equals(this.
|
|
347
|
+
if (!equals(this.mb5_1, other.mb5_1))
|
|
348
348
|
return false;
|
|
349
|
-
if (!equals(this.
|
|
349
|
+
if (!equals(this.nb5_1, other.nb5_1))
|
|
350
350
|
return false;
|
|
351
|
-
if (!equals(this.
|
|
351
|
+
if (!equals(this.ob5_1, other.ob5_1))
|
|
352
352
|
return false;
|
|
353
|
-
if (!(this.
|
|
353
|
+
if (!(this.pb5_1 === other.pb5_1))
|
|
354
354
|
return false;
|
|
355
|
-
if (!equals(this.
|
|
355
|
+
if (!equals(this.qb5_1, other.qb5_1))
|
|
356
356
|
return false;
|
|
357
|
-
if (!(this.
|
|
357
|
+
if (!(this.rb5_1 === other.rb5_1))
|
|
358
358
|
return false;
|
|
359
|
-
if (!(this.
|
|
359
|
+
if (!(this.sb5_1 === other.sb5_1))
|
|
360
360
|
return false;
|
|
361
|
-
if (!(this.
|
|
361
|
+
if (!(this.tb5_1 === other.tb5_1))
|
|
362
362
|
return false;
|
|
363
|
-
if (!(this.
|
|
363
|
+
if (!(this.ub5_1 === other.ub5_1))
|
|
364
364
|
return false;
|
|
365
|
-
if (!(this.
|
|
365
|
+
if (!(this.vb5_1 === other.vb5_1))
|
|
366
366
|
return false;
|
|
367
|
-
if (!(this.
|
|
367
|
+
if (!(this.wb5_1 === other.wb5_1))
|
|
368
368
|
return false;
|
|
369
|
-
if (!(this.
|
|
369
|
+
if (!(this.xb5_1 === other.xb5_1))
|
|
370
370
|
return false;
|
|
371
|
-
if (!equals(this.
|
|
371
|
+
if (!equals(this.yb5_1, other.yb5_1))
|
|
372
372
|
return false;
|
|
373
|
-
if (!(this.
|
|
373
|
+
if (!(this.zb5_1 == other.zb5_1))
|
|
374
374
|
return false;
|
|
375
|
-
if (!(this.
|
|
375
|
+
if (!(this.ab6_1 == other.ab6_1))
|
|
376
376
|
return false;
|
|
377
|
-
if (!equals(this.
|
|
377
|
+
if (!equals(this.bb6_1, other.bb6_1))
|
|
378
378
|
return false;
|
|
379
|
-
if (!this.
|
|
379
|
+
if (!this.cb6_1.equals(other.cb6_1))
|
|
380
380
|
return false;
|
|
381
|
-
if (!this.
|
|
381
|
+
if (!this.db6_1.equals(other.db6_1))
|
|
382
382
|
return false;
|
|
383
|
-
if (!(this.
|
|
383
|
+
if (!(this.eb6_1 === other.eb6_1))
|
|
384
384
|
return false;
|
|
385
385
|
return true;
|
|
386
386
|
};
|
|
387
387
|
function SuitSelectionEvent(playerId, suit, circleNumber) {
|
|
388
|
-
this.
|
|
389
|
-
this.
|
|
390
|
-
this.
|
|
388
|
+
this.fb6_1 = playerId;
|
|
389
|
+
this.gb6_1 = suit;
|
|
390
|
+
this.hb6_1 = circleNumber;
|
|
391
391
|
}
|
|
392
392
|
protoOf(SuitSelectionEvent).toString = function () {
|
|
393
|
-
return 'SuitSelectionEvent(playerId=' + this.
|
|
393
|
+
return 'SuitSelectionEvent(playerId=' + this.fb6_1 + ', suit=' + toString(this.gb6_1) + ', circleNumber=' + this.hb6_1 + ')';
|
|
394
394
|
};
|
|
395
395
|
protoOf(SuitSelectionEvent).hashCode = function () {
|
|
396
|
-
var result = getStringHashCode(this.
|
|
397
|
-
result = imul(result, 31) + (this.
|
|
398
|
-
result = imul(result, 31) + this.
|
|
396
|
+
var result = getStringHashCode(this.fb6_1);
|
|
397
|
+
result = imul(result, 31) + (this.gb6_1 == null ? 0 : this.gb6_1.hashCode()) | 0;
|
|
398
|
+
result = imul(result, 31) + this.hb6_1 | 0;
|
|
399
399
|
return result;
|
|
400
400
|
};
|
|
401
401
|
protoOf(SuitSelectionEvent).equals = function (other) {
|
|
@@ -403,11 +403,11 @@
|
|
|
403
403
|
return true;
|
|
404
404
|
if (!(other instanceof SuitSelectionEvent))
|
|
405
405
|
return false;
|
|
406
|
-
if (!(this.
|
|
406
|
+
if (!(this.fb6_1 === other.fb6_1))
|
|
407
407
|
return false;
|
|
408
|
-
if (!equals(this.
|
|
408
|
+
if (!equals(this.gb6_1, other.gb6_1))
|
|
409
409
|
return false;
|
|
410
|
-
if (!(this.
|
|
410
|
+
if (!(this.hb6_1 === other.hb6_1))
|
|
411
411
|
return false;
|
|
412
412
|
return true;
|
|
413
413
|
};
|
|
@@ -415,36 +415,36 @@
|
|
|
415
415
|
var _iterator__ex2g4s = cards.t();
|
|
416
416
|
while (_iterator__ex2g4s.u()) {
|
|
417
417
|
var card = _iterator__ex2g4s.v();
|
|
418
|
-
vec[offset + CardLocationIndex_instance.
|
|
418
|
+
vec[offset + CardLocationIndex_instance.lb6(card) | 0] = 1.0;
|
|
419
419
|
}
|
|
420
420
|
return offset + 32 | 0;
|
|
421
421
|
}
|
|
422
422
|
function encodeCardOneHot($this, vec, offset, card) {
|
|
423
423
|
if (!(card == null)) {
|
|
424
|
-
vec[offset + CardLocationIndex_instance.
|
|
424
|
+
vec[offset + CardLocationIndex_instance.lb6(card) | 0] = 1.0;
|
|
425
425
|
}
|
|
426
426
|
return offset + 32 | 0;
|
|
427
427
|
}
|
|
428
428
|
function Companion() {
|
|
429
|
-
this.
|
|
430
|
-
this.
|
|
431
|
-
this.
|
|
429
|
+
this.mb6_1 = 32;
|
|
430
|
+
this.nb6_1 = 162.0;
|
|
431
|
+
this.ob6_1 = 8.0;
|
|
432
432
|
}
|
|
433
433
|
var Companion_instance_1;
|
|
434
434
|
function Companion_getInstance() {
|
|
435
435
|
return Companion_instance_1;
|
|
436
436
|
}
|
|
437
437
|
function sam$kotlin_Comparator$0(function_0) {
|
|
438
|
-
this.
|
|
438
|
+
this.pb6_1 = function_0;
|
|
439
439
|
}
|
|
440
440
|
protoOf(sam$kotlin_Comparator$0).hd = function (a, b) {
|
|
441
|
-
return this.
|
|
441
|
+
return this.pb6_1(a, b);
|
|
442
442
|
};
|
|
443
443
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
444
444
|
return this.hd(a, b);
|
|
445
445
|
};
|
|
446
446
|
protoOf(sam$kotlin_Comparator$0).s3 = function () {
|
|
447
|
-
return this.
|
|
447
|
+
return this.pb6_1;
|
|
448
448
|
};
|
|
449
449
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
450
450
|
var tmp;
|
|
@@ -466,33 +466,33 @@
|
|
|
466
466
|
};
|
|
467
467
|
function BeliefFeatureEncoder$encode$lambda(a, b) {
|
|
468
468
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
469
|
-
var tmp = a.
|
|
470
|
-
var tmp$ret$1 = b.
|
|
469
|
+
var tmp = a.k8j_1;
|
|
470
|
+
var tmp$ret$1 = b.k8j_1;
|
|
471
471
|
return compareValues(tmp, tmp$ret$1);
|
|
472
472
|
}
|
|
473
473
|
function BeliefFeatureEncoder(playersMode) {
|
|
474
|
-
this.
|
|
475
|
-
this.
|
|
476
|
-
this.
|
|
474
|
+
this.qb6_1 = playersMode;
|
|
475
|
+
this.rb6_1 = this.qb6_1.count;
|
|
476
|
+
this.sb6_1 = this.rb6_1 - 1 | 0;
|
|
477
477
|
var tmp = this;
|
|
478
478
|
// Inline function 'kotlin.run' call
|
|
479
|
-
tmp.
|
|
479
|
+
tmp.tb6_1 = ((((((((((((((32 + imul(32, this.rb6_1) | 0) + 96 | 0) + 4 | 0) + 32 | 0) + 1 | 0) + imul(this.rb6_1, 4) | 0) + 8 | 0) + 4 | 0) + 4 | 0) + this.sb6_1 | 0) + imul(this.sb6_1, 4) | 0) + 1 | 0) + this.sb6_1 | 0) + 4 | 0) + 1 | 0;
|
|
480
480
|
}
|
|
481
|
-
protoOf(BeliefFeatureEncoder).
|
|
482
|
-
var vec = new Float32Array(this.
|
|
481
|
+
protoOf(BeliefFeatureEncoder).ub6 = function (state) {
|
|
482
|
+
var vec = new Float32Array(this.tb6_1);
|
|
483
483
|
var offset = 0;
|
|
484
|
-
var focalIndex = state.
|
|
485
|
-
var n = state.
|
|
486
|
-
offset = encodeCardSet(this, vec, offset, state.
|
|
484
|
+
var focalIndex = state.jb5_1.o2(state.ib5_1);
|
|
485
|
+
var n = state.jb5_1.g1();
|
|
486
|
+
offset = encodeCardSet(this, vec, offset, state.kb5_1);
|
|
487
487
|
var inductionVariable = 0;
|
|
488
|
-
var last = this.
|
|
488
|
+
var last = this.rb6_1;
|
|
489
489
|
if (inductionVariable < last)
|
|
490
490
|
do {
|
|
491
491
|
var relPos = inductionVariable;
|
|
492
492
|
inductionVariable = inductionVariable + 1 | 0;
|
|
493
493
|
var absIdx = (focalIndex + relPos | 0) % n | 0;
|
|
494
494
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
495
|
-
var this_0 = state.
|
|
495
|
+
var this_0 = state.jb5_1;
|
|
496
496
|
var tmp;
|
|
497
497
|
if (0 <= absIdx ? absIdx < this_0.g1() : false) {
|
|
498
498
|
tmp = this_0.h1(absIdx);
|
|
@@ -501,12 +501,12 @@
|
|
|
501
501
|
}
|
|
502
502
|
var pid = tmp;
|
|
503
503
|
var tmp_0 = offset;
|
|
504
|
-
var tmp0_elvis_lhs = state.
|
|
504
|
+
var tmp0_elvis_lhs = state.lb5_1.v2(pid);
|
|
505
505
|
offset = encodeCardSet(this, vec, tmp_0, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
|
|
506
506
|
}
|
|
507
507
|
while (inductionVariable < last);
|
|
508
508
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
509
|
-
var this_1 = state.
|
|
509
|
+
var this_1 = state.mb5_1;
|
|
510
510
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
511
511
|
var tmp_1 = BeliefFeatureEncoder$encode$lambda;
|
|
512
512
|
var tmp$ret$2 = new sam$kotlin_Comparator$0(tmp_1);
|
|
@@ -517,28 +517,28 @@
|
|
|
517
517
|
var slot = inductionVariable_0;
|
|
518
518
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
519
519
|
var tmp1_safe_receiver = getOrNull(sortedTrick, slot);
|
|
520
|
-
var card = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
520
|
+
var card = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l8j_1;
|
|
521
521
|
offset = encodeCardOneHot(this, vec, offset, card);
|
|
522
522
|
}
|
|
523
523
|
while (inductionVariable_0 <= 2);
|
|
524
|
-
var trump = state.
|
|
524
|
+
var trump = state.nb5_1;
|
|
525
525
|
if (!(trump == null)) {
|
|
526
526
|
vec[offset + trump.a1_1 | 0] = 1.0;
|
|
527
527
|
}
|
|
528
528
|
offset = offset + 4 | 0;
|
|
529
|
-
offset = encodeCardOneHot(this, vec, offset, state.
|
|
529
|
+
offset = encodeCardOneHot(this, vec, offset, state.ob5_1);
|
|
530
530
|
var _unary__edvuaz = offset;
|
|
531
531
|
offset = _unary__edvuaz + 1 | 0;
|
|
532
|
-
vec[_unary__edvuaz] = state.
|
|
532
|
+
vec[_unary__edvuaz] = state.pb5_1 ? 1.0 : 0.0;
|
|
533
533
|
var inductionVariable_1 = 0;
|
|
534
|
-
var last_0 = this.
|
|
534
|
+
var last_0 = this.rb6_1;
|
|
535
535
|
if (inductionVariable_1 < last_0)
|
|
536
536
|
do {
|
|
537
537
|
var relPos_0 = inductionVariable_1;
|
|
538
538
|
inductionVariable_1 = inductionVariable_1 + 1 | 0;
|
|
539
539
|
var absIdx_0 = (focalIndex + relPos_0 | 0) % n | 0;
|
|
540
540
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
541
|
-
var this_2 = state.
|
|
541
|
+
var this_2 = state.jb5_1;
|
|
542
542
|
var tmp_2;
|
|
543
543
|
if (0 <= absIdx_0 ? absIdx_0 < this_2.g1() : false) {
|
|
544
544
|
tmp_2 = this_2.h1(absIdx_0);
|
|
@@ -547,13 +547,13 @@
|
|
|
547
547
|
}
|
|
548
548
|
var pid_0 = tmp_2;
|
|
549
549
|
// Inline function 'kotlin.collections.filter' call
|
|
550
|
-
var tmp0 = state.
|
|
550
|
+
var tmp0 = state.qb5_1;
|
|
551
551
|
// Inline function 'kotlin.collections.filterTo' call
|
|
552
552
|
var destination = ArrayList_init_$Create$();
|
|
553
553
|
var _iterator__ex2g4s = tmp0.t();
|
|
554
554
|
while (_iterator__ex2g4s.u()) {
|
|
555
555
|
var element = _iterator__ex2g4s.v();
|
|
556
|
-
if (element.
|
|
556
|
+
if (element.fb6_1 === pid_0 && !(element.gb6_1 == null)) {
|
|
557
557
|
destination.e1(element);
|
|
558
558
|
}
|
|
559
559
|
}
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
var _iterator__ex2g4s_0 = destination.t();
|
|
565
565
|
while (_iterator__ex2g4s_0.u()) {
|
|
566
566
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
567
|
-
var tmp0_safe_receiver = element_0.
|
|
567
|
+
var tmp0_safe_receiver = element_0.gb6_1;
|
|
568
568
|
if (tmp0_safe_receiver == null)
|
|
569
569
|
null;
|
|
570
570
|
else {
|
|
@@ -585,34 +585,34 @@
|
|
|
585
585
|
while (inductionVariable_2 < 4);
|
|
586
586
|
}
|
|
587
587
|
while (inductionVariable_1 < last_0);
|
|
588
|
-
var trickIdx = coerceIn(state.
|
|
588
|
+
var trickIdx = coerceIn(state.vb5_1, 0, 7);
|
|
589
589
|
vec[offset + trickIdx | 0] = 1.0;
|
|
590
590
|
offset = offset + 8 | 0;
|
|
591
|
-
var posIdx = coerceIn(state.
|
|
591
|
+
var posIdx = coerceIn(state.wb5_1, 0, 3);
|
|
592
592
|
vec[offset + posIdx | 0] = 1.0;
|
|
593
593
|
offset = offset + 4 | 0;
|
|
594
|
-
var winTarget = coerceAtLeast(state.
|
|
594
|
+
var winTarget = coerceAtLeast(state.cb6_1.winTargetPoints, 1.0);
|
|
595
595
|
var _unary__edvuaz_1 = offset;
|
|
596
596
|
offset = _unary__edvuaz_1 + 1 | 0;
|
|
597
|
-
vec[_unary__edvuaz_1] = state.
|
|
597
|
+
vec[_unary__edvuaz_1] = state.rb5_1 / winTarget;
|
|
598
598
|
var _unary__edvuaz_2 = offset;
|
|
599
599
|
offset = _unary__edvuaz_2 + 1 | 0;
|
|
600
|
-
vec[_unary__edvuaz_2] = state.
|
|
600
|
+
vec[_unary__edvuaz_2] = state.sb5_1 / winTarget;
|
|
601
601
|
var _unary__edvuaz_3 = offset;
|
|
602
602
|
offset = _unary__edvuaz_3 + 1 | 0;
|
|
603
|
-
vec[_unary__edvuaz_3] = state.
|
|
603
|
+
vec[_unary__edvuaz_3] = state.tb5_1 / 162.0;
|
|
604
604
|
var _unary__edvuaz_4 = offset;
|
|
605
605
|
offset = _unary__edvuaz_4 + 1 | 0;
|
|
606
|
-
vec[_unary__edvuaz_4] = state.
|
|
606
|
+
vec[_unary__edvuaz_4] = state.ub5_1 / 162.0;
|
|
607
607
|
var inductionVariable_3 = 1;
|
|
608
|
-
var last_1 = this.
|
|
608
|
+
var last_1 = this.sb6_1;
|
|
609
609
|
if (inductionVariable_3 <= last_1)
|
|
610
610
|
do {
|
|
611
611
|
var relPos_1 = inductionVariable_3;
|
|
612
612
|
inductionVariable_3 = inductionVariable_3 + 1 | 0;
|
|
613
613
|
var absIdx_1 = (focalIndex + relPos_1 | 0) % n | 0;
|
|
614
614
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
615
|
-
var this_3 = state.
|
|
615
|
+
var this_3 = state.jb5_1;
|
|
616
616
|
var tmp_3;
|
|
617
617
|
if (0 <= absIdx_1 ? absIdx_1 < this_3.g1() : false) {
|
|
618
618
|
tmp_3 = this_3.h1(absIdx_1);
|
|
@@ -620,23 +620,23 @@
|
|
|
620
620
|
tmp_3 = '';
|
|
621
621
|
}
|
|
622
622
|
var pid_1 = tmp_3;
|
|
623
|
-
var tmp2_elvis_lhs = state.
|
|
623
|
+
var tmp2_elvis_lhs = state.lb5_1.v2(pid_1);
|
|
624
624
|
var played = (tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs).g1();
|
|
625
|
-
var remaining = coerceAtLeast_0(state.
|
|
625
|
+
var remaining = coerceAtLeast_0(state.eb6_1 - played | 0, 0);
|
|
626
626
|
var _unary__edvuaz_5 = offset;
|
|
627
627
|
offset = _unary__edvuaz_5 + 1 | 0;
|
|
628
|
-
vec[_unary__edvuaz_5] = remaining / coerceAtLeast(state.
|
|
628
|
+
vec[_unary__edvuaz_5] = remaining / coerceAtLeast(state.eb6_1, 1.0);
|
|
629
629
|
}
|
|
630
630
|
while (!(relPos_1 === last_1));
|
|
631
631
|
var inductionVariable_4 = 1;
|
|
632
|
-
var last_2 = this.
|
|
632
|
+
var last_2 = this.sb6_1;
|
|
633
633
|
if (inductionVariable_4 <= last_2)
|
|
634
634
|
do {
|
|
635
635
|
var relPos_2 = inductionVariable_4;
|
|
636
636
|
inductionVariable_4 = inductionVariable_4 + 1 | 0;
|
|
637
637
|
var absIdx_2 = (focalIndex + relPos_2 | 0) % n | 0;
|
|
638
638
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
639
|
-
var this_4 = state.
|
|
639
|
+
var this_4 = state.jb5_1;
|
|
640
640
|
var tmp_4;
|
|
641
641
|
if (0 <= absIdx_2 ? absIdx_2 < this_4.g1() : false) {
|
|
642
642
|
tmp_4 = this_4.h1(absIdx_2);
|
|
@@ -644,7 +644,7 @@
|
|
|
644
644
|
tmp_4 = '';
|
|
645
645
|
}
|
|
646
646
|
var pid_2 = tmp_4;
|
|
647
|
-
var tmp3_elvis_lhs = state.
|
|
647
|
+
var tmp3_elvis_lhs = state.yb5_1.v2(pid_2);
|
|
648
648
|
var voidsForPlayer = tmp3_elvis_lhs == null ? emptySet() : tmp3_elvis_lhs;
|
|
649
649
|
var inductionVariable_5 = 0;
|
|
650
650
|
if (inductionVariable_5 < 4)
|
|
@@ -660,17 +660,17 @@
|
|
|
660
660
|
while (!(relPos_2 === last_2));
|
|
661
661
|
var _unary__edvuaz_7 = offset;
|
|
662
662
|
offset = _unary__edvuaz_7 + 1 | 0;
|
|
663
|
-
vec[_unary__edvuaz_7] = state.
|
|
664
|
-
var declarerId = state.
|
|
663
|
+
vec[_unary__edvuaz_7] = state.zb5_1 === true ? 1.0 : 0.0;
|
|
664
|
+
var declarerId = state.ab6_1;
|
|
665
665
|
var inductionVariable_6 = 1;
|
|
666
|
-
var last_3 = this.
|
|
666
|
+
var last_3 = this.sb6_1;
|
|
667
667
|
if (inductionVariable_6 <= last_3)
|
|
668
668
|
do {
|
|
669
669
|
var relPos_3 = inductionVariable_6;
|
|
670
670
|
inductionVariable_6 = inductionVariable_6 + 1 | 0;
|
|
671
671
|
var absIdx_3 = (focalIndex + relPos_3 | 0) % n | 0;
|
|
672
672
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
673
|
-
var this_5 = state.
|
|
673
|
+
var this_5 = state.jb5_1;
|
|
674
674
|
var tmp_5;
|
|
675
675
|
if (0 <= absIdx_3 ? absIdx_3 < this_5.g1() : false) {
|
|
676
676
|
tmp_5 = this_5.h1(absIdx_3);
|
|
@@ -685,7 +685,7 @@
|
|
|
685
685
|
while (!(relPos_3 === last_3));
|
|
686
686
|
var suitCounts = new Int32Array(4);
|
|
687
687
|
// Inline function 'kotlin.collections.iterator' call
|
|
688
|
-
var _iterator__ex2g4s_1 = state.
|
|
688
|
+
var _iterator__ex2g4s_1 = state.lb5_1.m1().t();
|
|
689
689
|
while (_iterator__ex2g4s_1.u()) {
|
|
690
690
|
// Inline function 'kotlin.collections.component2' call
|
|
691
691
|
var cards = _iterator__ex2g4s_1.v().o1();
|
|
@@ -696,10 +696,10 @@
|
|
|
696
696
|
suitCounts[_index_0__fvwizt] = suitCounts[_index_0__fvwizt] + 1 | 0;
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
var _iterator__ex2g4s_3 = state.
|
|
699
|
+
var _iterator__ex2g4s_3 = state.mb5_1.t();
|
|
700
700
|
while (_iterator__ex2g4s_3.u()) {
|
|
701
701
|
var cot = _iterator__ex2g4s_3.v();
|
|
702
|
-
var _index_0__fvwizt_0 = cot.
|
|
702
|
+
var _index_0__fvwizt_0 = cot.l8j_1.x6l().a1_1;
|
|
703
703
|
suitCounts[_index_0__fvwizt_0] = suitCounts[_index_0__fvwizt_0] + 1 | 0;
|
|
704
704
|
}
|
|
705
705
|
var inductionVariable_7 = 0;
|
|
@@ -714,10 +714,10 @@
|
|
|
714
714
|
while (inductionVariable_7 < 4);
|
|
715
715
|
var _unary__edvuaz_10 = offset;
|
|
716
716
|
offset = _unary__edvuaz_10 + 1 | 0;
|
|
717
|
-
vec[_unary__edvuaz_10] = state.
|
|
717
|
+
vec[_unary__edvuaz_10] = state.xb5_1 ? 1.0 : 0.0;
|
|
718
718
|
// Inline function 'kotlin.check' call
|
|
719
|
-
if (!(offset === this.
|
|
720
|
-
var message = 'BeliefFeatureEncoder: wrote ' + offset + ' floats but expected ' + this.
|
|
719
|
+
if (!(offset === this.tb6_1)) {
|
|
720
|
+
var message = 'BeliefFeatureEncoder: wrote ' + offset + ' floats but expected ' + this.tb6_1;
|
|
721
721
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
722
722
|
}
|
|
723
723
|
return vec;
|
|
@@ -728,38 +728,38 @@
|
|
|
728
728
|
return 1.0 / (1.0 + Math.exp(x_0));
|
|
729
729
|
}
|
|
730
730
|
function CardBeliefNetwork(engine, encoder, playersMode) {
|
|
731
|
-
this.
|
|
732
|
-
this.
|
|
733
|
-
this.
|
|
734
|
-
this.
|
|
735
|
-
this.
|
|
736
|
-
}
|
|
737
|
-
protoOf(CardBeliefNetwork).
|
|
738
|
-
this.
|
|
739
|
-
this.
|
|
731
|
+
this.vb6_1 = engine;
|
|
732
|
+
this.wb6_1 = encoder;
|
|
733
|
+
this.xb6_1 = playersMode;
|
|
734
|
+
this.yb6_1 = CardLocationIndex_instance.ab7(this.xb6_1);
|
|
735
|
+
this.zb6_1 = false;
|
|
736
|
+
}
|
|
737
|
+
protoOf(CardBeliefNetwork).bb7 = function (modelBytes) {
|
|
738
|
+
this.vb6_1.bb7(modelBytes);
|
|
739
|
+
this.zb6_1 = true;
|
|
740
740
|
};
|
|
741
|
-
protoOf(CardBeliefNetwork).
|
|
741
|
+
protoOf(CardBeliefNetwork).cb7 = function (state) {
|
|
742
742
|
var knownCards = booleanArray(32);
|
|
743
|
-
var _iterator__ex2g4s = state.
|
|
743
|
+
var _iterator__ex2g4s = state.kb5_1.t();
|
|
744
744
|
while (_iterator__ex2g4s.u()) {
|
|
745
745
|
var card = _iterator__ex2g4s.v();
|
|
746
|
-
knownCards[CardLocationIndex_instance.
|
|
746
|
+
knownCards[CardLocationIndex_instance.lb6(card)] = true;
|
|
747
747
|
}
|
|
748
748
|
// Inline function 'kotlin.collections.iterator' call
|
|
749
|
-
var _iterator__ex2g4s_0 = state.
|
|
749
|
+
var _iterator__ex2g4s_0 = state.lb5_1.m1().t();
|
|
750
750
|
while (_iterator__ex2g4s_0.u()) {
|
|
751
751
|
// Inline function 'kotlin.collections.component2' call
|
|
752
752
|
var cards = _iterator__ex2g4s_0.v().o1();
|
|
753
753
|
var _iterator__ex2g4s_1 = cards.t();
|
|
754
754
|
while (_iterator__ex2g4s_1.u()) {
|
|
755
755
|
var card_0 = _iterator__ex2g4s_1.v();
|
|
756
|
-
knownCards[CardLocationIndex_instance.
|
|
756
|
+
knownCards[CardLocationIndex_instance.lb6(card_0)] = true;
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
var _iterator__ex2g4s_2 = state.
|
|
759
|
+
var _iterator__ex2g4s_2 = state.mb5_1.t();
|
|
760
760
|
while (_iterator__ex2g4s_2.u()) {
|
|
761
761
|
var cot = _iterator__ex2g4s_2.v();
|
|
762
|
-
knownCards[CardLocationIndex_instance.
|
|
762
|
+
knownCards[CardLocationIndex_instance.lb6(cot.l8j_1)] = true;
|
|
763
763
|
}
|
|
764
764
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
765
765
|
var hiddenIndices = ArrayList_init_$Create$();
|
|
@@ -773,8 +773,8 @@
|
|
|
773
773
|
}
|
|
774
774
|
}
|
|
775
775
|
while (inductionVariable < 32);
|
|
776
|
-
if (!this.
|
|
777
|
-
var uniform = 1.0 / this.
|
|
776
|
+
if (!this.zb6_1) {
|
|
777
|
+
var uniform = 1.0 / this.yb6_1;
|
|
778
778
|
var tmp = 0;
|
|
779
779
|
var tmp_0 = hiddenIndices.g1();
|
|
780
780
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
@@ -782,7 +782,7 @@
|
|
|
782
782
|
while (tmp < tmp_0) {
|
|
783
783
|
var tmp_2 = tmp;
|
|
784
784
|
var tmp_3 = 0;
|
|
785
|
-
var tmp_4 = this.
|
|
785
|
+
var tmp_4 = this.yb6_1;
|
|
786
786
|
var tmp_5 = new Float32Array(tmp_4);
|
|
787
787
|
while (tmp_3 < tmp_4) {
|
|
788
788
|
tmp_5[tmp_3] = uniform;
|
|
@@ -794,8 +794,8 @@
|
|
|
794
794
|
var matrix = tmp_1;
|
|
795
795
|
return new CardBeliefResult(matrix, toIntArray(hiddenIndices));
|
|
796
796
|
}
|
|
797
|
-
var features = this.
|
|
798
|
-
var rawOutput = this.
|
|
797
|
+
var features = this.wb6_1.ub6(state);
|
|
798
|
+
var rawOutput = this.vb6_1.db7(features);
|
|
799
799
|
var tmp_6 = 0;
|
|
800
800
|
var tmp_7 = hiddenIndices.g1();
|
|
801
801
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
@@ -804,7 +804,7 @@
|
|
|
804
804
|
var tmp_9 = tmp_6;
|
|
805
805
|
var cardIdx = hiddenIndices.h1(tmp_9);
|
|
806
806
|
var tmp_10;
|
|
807
|
-
if (this.
|
|
807
|
+
if (this.yb6_1 === 1) {
|
|
808
808
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
809
809
|
var tmp_11;
|
|
810
810
|
if (0 <= cardIdx ? cardIdx <= (rawOutput.length - 1 | 0) : false) {
|
|
@@ -816,9 +816,9 @@
|
|
|
816
816
|
// Inline function 'kotlin.floatArrayOf' call
|
|
817
817
|
tmp_10 = new Float32Array([sigmoid(this, logit)]);
|
|
818
818
|
} else {
|
|
819
|
-
var rowStart = imul(cardIdx, this.
|
|
819
|
+
var rowStart = imul(cardIdx, this.yb6_1);
|
|
820
820
|
var tmp_12 = 0;
|
|
821
|
-
var tmp_13 = this.
|
|
821
|
+
var tmp_13 = this.yb6_1;
|
|
822
822
|
var tmp_14 = new Float32Array(tmp_13);
|
|
823
823
|
while (tmp_12 < tmp_13) {
|
|
824
824
|
var tmp_15 = tmp_12;
|
|
@@ -834,7 +834,7 @@
|
|
|
834
834
|
tmp_12 = tmp_12 + 1 | 0;
|
|
835
835
|
}
|
|
836
836
|
var logits = tmp_14;
|
|
837
|
-
tmp_10 = Companion_instance_4.
|
|
837
|
+
tmp_10 = Companion_instance_4.fb7(logits);
|
|
838
838
|
}
|
|
839
839
|
tmp_8[tmp_9] = tmp_10;
|
|
840
840
|
tmp_6 = tmp_6 + 1 | 0;
|
|
@@ -843,8 +843,8 @@
|
|
|
843
843
|
return new CardBeliefResult(matrix_0, toIntArray(hiddenIndices));
|
|
844
844
|
};
|
|
845
845
|
function CardBeliefResult(beliefMatrix, hiddenCardIndices) {
|
|
846
|
-
this.
|
|
847
|
-
this.
|
|
846
|
+
this.gb7_1 = beliefMatrix;
|
|
847
|
+
this.hb7_1 = hiddenCardIndices;
|
|
848
848
|
}
|
|
849
849
|
protoOf(CardBeliefResult).equals = function (other) {
|
|
850
850
|
if (this === other)
|
|
@@ -854,8 +854,8 @@
|
|
|
854
854
|
if (!(other instanceof CardBeliefResult))
|
|
855
855
|
THROW_CCE();
|
|
856
856
|
var tmp;
|
|
857
|
-
if (contentEquals_0(this.
|
|
858
|
-
var tmp0 = get_indices(this.
|
|
857
|
+
if (contentEquals_0(this.hb7_1, other.hb7_1) && this.gb7_1.length === other.gb7_1.length) {
|
|
858
|
+
var tmp0 = get_indices(this.gb7_1);
|
|
859
859
|
var tmp$ret$0;
|
|
860
860
|
$l$block_0: {
|
|
861
861
|
// Inline function 'kotlin.collections.all' call
|
|
@@ -876,7 +876,7 @@
|
|
|
876
876
|
var element = inductionVariable;
|
|
877
877
|
inductionVariable = inductionVariable + 1 | 0;
|
|
878
878
|
var it = element;
|
|
879
|
-
if (!contentEquals(this.
|
|
879
|
+
if (!contentEquals(this.gb7_1[it], other.gb7_1[it])) {
|
|
880
880
|
tmp$ret$0 = false;
|
|
881
881
|
break $l$block_0;
|
|
882
882
|
}
|
|
@@ -891,22 +891,22 @@
|
|
|
891
891
|
return tmp;
|
|
892
892
|
};
|
|
893
893
|
protoOf(CardBeliefResult).hashCode = function () {
|
|
894
|
-
var result = contentHashCode(this.
|
|
895
|
-
result = imul(31, result) + contentDeepHashCode(this.
|
|
894
|
+
var result = contentHashCode(this.hb7_1);
|
|
895
|
+
result = imul(31, result) + contentDeepHashCode(this.gb7_1) | 0;
|
|
896
896
|
return result;
|
|
897
897
|
};
|
|
898
898
|
protoOf(CardBeliefResult).toString = function () {
|
|
899
|
-
return 'CardBeliefResult(beliefMatrix=' + toString_0(this.
|
|
899
|
+
return 'CardBeliefResult(beliefMatrix=' + toString_0(this.gb7_1) + ', hiddenCardIndices=' + toString_0(this.hb7_1) + ')';
|
|
900
900
|
};
|
|
901
901
|
function CardLocationIndex() {
|
|
902
|
-
this.
|
|
903
|
-
this.
|
|
904
|
-
this.
|
|
902
|
+
this.ib6_1 = 32;
|
|
903
|
+
this.jb6_1 = 4;
|
|
904
|
+
this.kb6_1 = 8;
|
|
905
905
|
}
|
|
906
|
-
protoOf(CardLocationIndex).
|
|
906
|
+
protoOf(CardLocationIndex).lb6 = function (card) {
|
|
907
907
|
return imul(card.x6l().a1_1, 8) + card.m().a1_1 | 0;
|
|
908
908
|
};
|
|
909
|
-
protoOf(CardLocationIndex).
|
|
909
|
+
protoOf(CardLocationIndex).ab7 = function (mode) {
|
|
910
910
|
return mode.count - 1 | 0;
|
|
911
911
|
};
|
|
912
912
|
var CardLocationIndex_instance;
|
|
@@ -914,16 +914,16 @@
|
|
|
914
914
|
return CardLocationIndex_instance;
|
|
915
915
|
}
|
|
916
916
|
function sam$kotlin_Comparator$0_0(function_0) {
|
|
917
|
-
this.
|
|
917
|
+
this.ib7_1 = function_0;
|
|
918
918
|
}
|
|
919
919
|
protoOf(sam$kotlin_Comparator$0_0).hd = function (a, b) {
|
|
920
|
-
return this.
|
|
920
|
+
return this.ib7_1(a, b);
|
|
921
921
|
};
|
|
922
922
|
protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
|
|
923
923
|
return this.hd(a, b);
|
|
924
924
|
};
|
|
925
925
|
protoOf(sam$kotlin_Comparator$0_0).s3 = function () {
|
|
926
|
-
return this.
|
|
926
|
+
return this.ib7_1;
|
|
927
927
|
};
|
|
928
928
|
protoOf(sam$kotlin_Comparator$0_0).equals = function (other) {
|
|
929
929
|
var tmp;
|
|
@@ -945,13 +945,13 @@
|
|
|
945
945
|
};
|
|
946
946
|
function SuitVoidDetector$detectVoids$lambda(a, b) {
|
|
947
947
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
948
|
-
var tmp = a.
|
|
949
|
-
var tmp$ret$1 = b.
|
|
948
|
+
var tmp = a.k8j_1;
|
|
949
|
+
var tmp$ret$1 = b.k8j_1;
|
|
950
950
|
return compareValues(tmp, tmp$ret$1);
|
|
951
951
|
}
|
|
952
952
|
function SuitVoidDetector() {
|
|
953
953
|
}
|
|
954
|
-
protoOf(SuitVoidDetector).
|
|
954
|
+
protoOf(SuitVoidDetector).jb7 = function (tricks) {
|
|
955
955
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
956
956
|
var voids = LinkedHashMap_init_$Create$();
|
|
957
957
|
var _iterator__ex2g4s = tricks.t();
|
|
@@ -964,13 +964,13 @@
|
|
|
964
964
|
var tmp = SuitVoidDetector$detectVoids$lambda;
|
|
965
965
|
var tmp$ret$1 = new sam$kotlin_Comparator$0_0(tmp);
|
|
966
966
|
var sorted = sortedWith(trick, tmp$ret$1);
|
|
967
|
-
var leadSuit = first(sorted).
|
|
967
|
+
var leadSuit = first(sorted).l8j_1.x6l();
|
|
968
968
|
var _iterator__ex2g4s_0 = sorted.t();
|
|
969
969
|
while (_iterator__ex2g4s_0.u()) {
|
|
970
970
|
var cardOnTable = _iterator__ex2g4s_0.v();
|
|
971
|
-
if (!cardOnTable.
|
|
971
|
+
if (!cardOnTable.l8j_1.x6l().equals(leadSuit)) {
|
|
972
972
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
973
|
-
var key = cardOnTable.
|
|
973
|
+
var key = cardOnTable.j8j_1;
|
|
974
974
|
var value = voids.v2(key);
|
|
975
975
|
var tmp_0;
|
|
976
976
|
if (value == null) {
|
|
@@ -992,17 +992,17 @@
|
|
|
992
992
|
return SuitVoidDetector_instance;
|
|
993
993
|
}
|
|
994
994
|
function BotModelConfig(playersMode, rulesSetType, modelBytes) {
|
|
995
|
-
this.
|
|
996
|
-
this.
|
|
997
|
-
this.
|
|
995
|
+
this.kb7_1 = playersMode;
|
|
996
|
+
this.lb7_1 = rulesSetType;
|
|
997
|
+
this.mb7_1 = modelBytes;
|
|
998
998
|
}
|
|
999
999
|
protoOf(BotModelConfig).toString = function () {
|
|
1000
|
-
return 'BotModelConfig(playersMode=' + this.
|
|
1000
|
+
return 'BotModelConfig(playersMode=' + this.kb7_1.toString() + ', rulesSetType=' + this.lb7_1.toString() + ', modelBytes=' + toString_0(this.mb7_1) + ')';
|
|
1001
1001
|
};
|
|
1002
1002
|
protoOf(BotModelConfig).hashCode = function () {
|
|
1003
|
-
var result = this.
|
|
1004
|
-
result = imul(result, 31) + this.
|
|
1005
|
-
result = imul(result, 31) + hashCode(this.
|
|
1003
|
+
var result = this.kb7_1.hashCode();
|
|
1004
|
+
result = imul(result, 31) + this.lb7_1.hashCode() | 0;
|
|
1005
|
+
result = imul(result, 31) + hashCode(this.mb7_1) | 0;
|
|
1006
1006
|
return result;
|
|
1007
1007
|
};
|
|
1008
1008
|
protoOf(BotModelConfig).equals = function (other) {
|
|
@@ -1010,43 +1010,43 @@
|
|
|
1010
1010
|
return true;
|
|
1011
1011
|
if (!(other instanceof BotModelConfig))
|
|
1012
1012
|
return false;
|
|
1013
|
-
if (!this.
|
|
1013
|
+
if (!this.kb7_1.equals(other.kb7_1))
|
|
1014
1014
|
return false;
|
|
1015
|
-
if (!this.
|
|
1015
|
+
if (!this.lb7_1.equals(other.lb7_1))
|
|
1016
1016
|
return false;
|
|
1017
|
-
if (!equals(this.
|
|
1017
|
+
if (!equals(this.mb7_1, other.mb7_1))
|
|
1018
1018
|
return false;
|
|
1019
1019
|
return true;
|
|
1020
1020
|
};
|
|
1021
1021
|
function BotModelRegistry() {
|
|
1022
1022
|
var tmp = this;
|
|
1023
1023
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1024
|
-
tmp.
|
|
1024
|
+
tmp.nb7_1 = LinkedHashMap_init_$Create$();
|
|
1025
1025
|
}
|
|
1026
|
-
protoOf(BotModelRegistry).
|
|
1027
|
-
var tmp0 = this.
|
|
1028
|
-
var tmp2 = new BotModelKey(config.
|
|
1026
|
+
protoOf(BotModelRegistry).ob7 = function (config) {
|
|
1027
|
+
var tmp0 = this.nb7_1;
|
|
1028
|
+
var tmp2 = new BotModelKey(config.kb7_1, config.lb7_1);
|
|
1029
1029
|
// Inline function 'kotlin.collections.set' call
|
|
1030
|
-
var value = config.
|
|
1030
|
+
var value = config.mb7_1;
|
|
1031
1031
|
tmp0.g3(tmp2, value);
|
|
1032
1032
|
};
|
|
1033
|
-
protoOf(BotModelRegistry).
|
|
1034
|
-
return this.
|
|
1033
|
+
protoOf(BotModelRegistry).pb7 = function (playersMode, rulesSetType) {
|
|
1034
|
+
return this.nb7_1.v2(new BotModelKey(playersMode, rulesSetType));
|
|
1035
1035
|
};
|
|
1036
|
-
protoOf(BotModelRegistry).
|
|
1036
|
+
protoOf(BotModelRegistry).qb7 = function () {
|
|
1037
1037
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1038
|
-
return !this.
|
|
1038
|
+
return !this.nb7_1.r();
|
|
1039
1039
|
};
|
|
1040
1040
|
function BotModelKey(playersMode, rulesSetType) {
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1041
|
+
this.rb7_1 = playersMode;
|
|
1042
|
+
this.sb7_1 = rulesSetType;
|
|
1043
1043
|
}
|
|
1044
1044
|
protoOf(BotModelKey).toString = function () {
|
|
1045
|
-
return 'BotModelKey(playersMode=' + this.
|
|
1045
|
+
return 'BotModelKey(playersMode=' + this.rb7_1.toString() + ', rulesSetType=' + this.sb7_1.toString() + ')';
|
|
1046
1046
|
};
|
|
1047
1047
|
protoOf(BotModelKey).hashCode = function () {
|
|
1048
|
-
var result = this.
|
|
1049
|
-
result = imul(result, 31) + this.
|
|
1048
|
+
var result = this.rb7_1.hashCode();
|
|
1049
|
+
result = imul(result, 31) + this.sb7_1.hashCode() | 0;
|
|
1050
1050
|
return result;
|
|
1051
1051
|
};
|
|
1052
1052
|
protoOf(BotModelKey).equals = function (other) {
|
|
@@ -1054,9 +1054,9 @@
|
|
|
1054
1054
|
return true;
|
|
1055
1055
|
if (!(other instanceof BotModelKey))
|
|
1056
1056
|
return false;
|
|
1057
|
-
if (!this.
|
|
1057
|
+
if (!this.rb7_1.equals(other.rb7_1))
|
|
1058
1058
|
return false;
|
|
1059
|
-
if (!this.
|
|
1059
|
+
if (!this.sb7_1.equals(other.sb7_1))
|
|
1060
1060
|
return false;
|
|
1061
1061
|
return true;
|
|
1062
1062
|
};
|
|
@@ -1089,13 +1089,13 @@
|
|
|
1089
1089
|
while (_iterator__ex2g4s_1.u()) {
|
|
1090
1090
|
var element = _iterator__ex2g4s_1.v();
|
|
1091
1091
|
// Inline function 'kotlin.collections.filter' call
|
|
1092
|
-
var tmp0_0 = element.
|
|
1092
|
+
var tmp0_0 = element.q91_1;
|
|
1093
1093
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1094
1094
|
var destination_1 = ArrayList_init_$Create$();
|
|
1095
1095
|
var _iterator__ex2g4s_2 = tmp0_0.t();
|
|
1096
1096
|
while (_iterator__ex2g4s_2.u()) {
|
|
1097
1097
|
var element_0 = _iterator__ex2g4s_2.v();
|
|
1098
|
-
if (element_0.
|
|
1098
|
+
if (element_0.j8j_1 === p) {
|
|
1099
1099
|
destination_1.e1(element_0);
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
@@ -1105,7 +1105,7 @@
|
|
|
1105
1105
|
var _iterator__ex2g4s_3 = destination_1.t();
|
|
1106
1106
|
while (_iterator__ex2g4s_3.u()) {
|
|
1107
1107
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1108
|
-
var tmp$ret$7 = item_0.
|
|
1108
|
+
var tmp$ret$7 = item_0.l8j_1;
|
|
1109
1109
|
destination_2.e1(tmp$ret$7);
|
|
1110
1110
|
}
|
|
1111
1111
|
var list = destination_2;
|
|
@@ -1118,10 +1118,10 @@
|
|
|
1118
1118
|
var opponentRoundPoints;
|
|
1119
1119
|
if (playersMode.isTeamGame && players.g1() === 4) {
|
|
1120
1120
|
var partnerIndex = (focalIndex + 2 | 0) % 4 | 0;
|
|
1121
|
-
ownRoundPoints = table.players.h1(focalIndex).
|
|
1122
|
-
opponentRoundPoints = table.players.h1((focalIndex + 1 | 0) % 4 | 0).
|
|
1121
|
+
ownRoundPoints = table.players.h1(focalIndex).b7z_1.s85_1 + table.players.h1(partnerIndex).b7z_1.s85_1 | 0;
|
|
1122
|
+
opponentRoundPoints = table.players.h1((focalIndex + 1 | 0) % 4 | 0).b7z_1.s85_1 + table.players.h1((focalIndex + 3 | 0) % 4 | 0).b7z_1.s85_1 | 0;
|
|
1123
1123
|
} else {
|
|
1124
|
-
ownRoundPoints = table.players.h1(focalIndex).
|
|
1124
|
+
ownRoundPoints = table.players.h1(focalIndex).b7z_1.s85_1;
|
|
1125
1125
|
// Inline function 'kotlin.collections.filter' call
|
|
1126
1126
|
var tmp0_1 = table.players;
|
|
1127
1127
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1139,7 +1139,7 @@
|
|
|
1139
1139
|
while (_iterator__ex2g4s_5.u()) {
|
|
1140
1140
|
var element_2 = _iterator__ex2g4s_5.v();
|
|
1141
1141
|
var tmp = sum;
|
|
1142
|
-
sum = tmp + element_2.
|
|
1142
|
+
sum = tmp + element_2.b7z_1.s85_1 | 0;
|
|
1143
1143
|
}
|
|
1144
1144
|
opponentRoundPoints = sum;
|
|
1145
1145
|
}
|
|
@@ -1153,7 +1153,7 @@
|
|
|
1153
1153
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
1154
1154
|
while (_iterator__ex2g4s_6.u()) {
|
|
1155
1155
|
var element_3 = _iterator__ex2g4s_6.v();
|
|
1156
|
-
if (element_3.
|
|
1156
|
+
if (element_3.z7y_1.q84_1) {
|
|
1157
1157
|
tmp$ret$20 = element_3;
|
|
1158
1158
|
break $l$block;
|
|
1159
1159
|
}
|
|
@@ -1164,7 +1164,7 @@
|
|
|
1164
1164
|
var trumpDeclarerId = trumpDeclarer == null ? null : trumpDeclarer.playerId;
|
|
1165
1165
|
var tmp_0;
|
|
1166
1166
|
if (!(trumpDeclarerId == null)) {
|
|
1167
|
-
tmp_0 = trumpDeclarer.
|
|
1167
|
+
tmp_0 = trumpDeclarer.z7y_1.y88();
|
|
1168
1168
|
} else {
|
|
1169
1169
|
tmp_0 = null;
|
|
1170
1170
|
}
|
|
@@ -1177,15 +1177,15 @@
|
|
|
1177
1177
|
var _iterator__ex2g4s_7 = this_1.t();
|
|
1178
1178
|
while (_iterator__ex2g4s_7.u()) {
|
|
1179
1179
|
var item_1 = _iterator__ex2g4s_7.v();
|
|
1180
|
-
var tmp$ret$21 = item_1.
|
|
1180
|
+
var tmp$ret$21 = item_1.q91_1;
|
|
1181
1181
|
destination_4.e1(tmp$ret$21);
|
|
1182
1182
|
}
|
|
1183
|
-
var suitVoids = tmp_1.
|
|
1183
|
+
var suitVoids = tmp_1.jb7(destination_4);
|
|
1184
1184
|
var tmp_2;
|
|
1185
1185
|
if (!(trumpDeclarerId == null) && !(table.currentTrump == null)) {
|
|
1186
1186
|
var circleNumber = trumpTakenInFirstCircle === true ? 1 : 2;
|
|
1187
1187
|
tmp_2 = listOf(new SuitSelectionEvent(trumpDeclarerId, table.currentTrump, circleNumber));
|
|
1188
|
-
} else if (player.
|
|
1188
|
+
} else if (player.z7y_1.z88()) {
|
|
1189
1189
|
tmp_2 = listOf(new SuitSelectionEvent(playerId, null, 2));
|
|
1190
1190
|
} else {
|
|
1191
1191
|
tmp_2 = emptyList();
|
|
@@ -1197,13 +1197,13 @@
|
|
|
1197
1197
|
while (_iterator__ex2g4s_8.u()) {
|
|
1198
1198
|
var p_0 = _iterator__ex2g4s_8.v();
|
|
1199
1199
|
// Inline function 'kotlin.collections.filter' call
|
|
1200
|
-
var tmp0_3 = p_0.
|
|
1200
|
+
var tmp0_3 = p_0.b7z_1.t85_1;
|
|
1201
1201
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1202
1202
|
var destination_5 = ArrayList_init_$Create$();
|
|
1203
1203
|
var _iterator__ex2g4s_9 = tmp0_3.t();
|
|
1204
1204
|
while (_iterator__ex2g4s_9.u()) {
|
|
1205
1205
|
var element_4 = _iterator__ex2g4s_9.v();
|
|
1206
|
-
if (element_4.
|
|
1206
|
+
if (element_4.f8a_1.equals(CombinationState_ACCEPTED_getInstance())) {
|
|
1207
1207
|
destination_5.e1(element_4);
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
@@ -1213,7 +1213,7 @@
|
|
|
1213
1213
|
var _iterator__ex2g4s_10 = destination_5.t();
|
|
1214
1214
|
while (_iterator__ex2g4s_10.u()) {
|
|
1215
1215
|
var item_2 = _iterator__ex2g4s_10.v();
|
|
1216
|
-
var tmp$ret$28 = item_2.
|
|
1216
|
+
var tmp$ret$28 = item_2.e8a_1;
|
|
1217
1217
|
destination_6.e1(tmp$ret$28);
|
|
1218
1218
|
}
|
|
1219
1219
|
var combos = destination_6;
|
|
@@ -1229,11 +1229,11 @@
|
|
|
1229
1229
|
if (!table.bribes.r()) {
|
|
1230
1230
|
var focalPlayer = table.players.h1(focalIndex);
|
|
1231
1231
|
var tmp_4;
|
|
1232
|
-
if (focalPlayer.
|
|
1232
|
+
if (focalPlayer.z7y_1.o84_1) {
|
|
1233
1233
|
tmp_4 = true;
|
|
1234
1234
|
} else if (playersMode.isTeamGame && players.g1() === 4) {
|
|
1235
1235
|
var partnerIndex_0 = (focalIndex + 2 | 0) % 4 | 0;
|
|
1236
|
-
tmp_4 = table.players.h1(partnerIndex_0).
|
|
1236
|
+
tmp_4 = table.players.h1(partnerIndex_0).z7y_1.o84_1;
|
|
1237
1237
|
} else {
|
|
1238
1238
|
tmp_4 = false;
|
|
1239
1239
|
}
|
|
@@ -1242,20 +1242,20 @@
|
|
|
1242
1242
|
tmp_3 = false;
|
|
1243
1243
|
}
|
|
1244
1244
|
var ownTeamWonLastTrick = tmp_3;
|
|
1245
|
-
var tmp4_ownCards = player.
|
|
1245
|
+
var tmp4_ownCards = player.y7y_1;
|
|
1246
1246
|
var tmp5_trump = table.currentTrump;
|
|
1247
1247
|
var tmp1_safe_receiver = table.cardDeck;
|
|
1248
|
-
var tmp6_trumpCard = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1248
|
+
var tmp6_trumpCard = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t91_1;
|
|
1249
1249
|
var tmp7_isTrumpDeclarer = trumpDeclarerId === playerId;
|
|
1250
|
-
var tmp_5 = player.
|
|
1250
|
+
var tmp_5 = player.y7y_1.g1();
|
|
1251
1251
|
var tmp2_safe_receiver = playedCards.v2(playerId);
|
|
1252
1252
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g1();
|
|
1253
1253
|
var tmp8_handSize = tmp_5 + (tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs) | 0;
|
|
1254
1254
|
return new BotGameState(playerId, players, tmp4_ownCards, playedCards, cardsOnTable, tmp5_trump, tmp6_trumpCard, tmp7_isTrumpDeclarer, suitSelectionHistory, 0, 0, ownRoundPoints, opponentRoundPoints, trickNumber, positionInTrick, ownTeamWonLastTrick, suitVoids, trumpTakenInFirstCircle, trumpDeclarerId, declaredCombinations, rules, playersMode, tmp8_handSize);
|
|
1255
1255
|
}
|
|
1256
1256
|
function computeLegalActions($this, playerId, table) {
|
|
1257
|
-
var sceneId = table.sceneInfo.
|
|
1258
|
-
var actId = table.sceneInfo.
|
|
1257
|
+
var sceneId = table.sceneInfo.f9f_1;
|
|
1258
|
+
var actId = table.sceneInfo.h9f_1;
|
|
1259
1259
|
var tmp;
|
|
1260
1260
|
if (actId === 'COMBINATION') {
|
|
1261
1261
|
tmp = listOf_0([new AcceptCombinations(true), new AcceptCombinations(false)]);
|
|
@@ -1272,7 +1272,7 @@
|
|
|
1272
1272
|
destination.e1(tmp$ret$0);
|
|
1273
1273
|
}
|
|
1274
1274
|
var suits = destination;
|
|
1275
|
-
var canPass = table.config.rules.playWithoutLiabilities || !player.
|
|
1275
|
+
var canPass = table.config.rules.playWithoutLiabilities || !player.z7y_1.i84_1 || !player.z7y_1.z88();
|
|
1276
1276
|
tmp = canPass ? plus(suits, new SelectSuit(null)) : suits;
|
|
1277
1277
|
} else if (get_isEarnPointScene(sceneId) && actId === 'PLAYER_TURN') {
|
|
1278
1278
|
var player_0 = getPlayer(table.players, playerId);
|
|
@@ -1293,7 +1293,7 @@
|
|
|
1293
1293
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1294
1294
|
while (_iterator__ex2g4s_0.u()) {
|
|
1295
1295
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1296
|
-
var tmp$ret$4 = new SimCard(item_0.
|
|
1296
|
+
var tmp$ret$4 = new SimCard(item_0.j8j_1, item_0.l8j_1);
|
|
1297
1297
|
destination_0.e1(tmp$ret$4);
|
|
1298
1298
|
}
|
|
1299
1299
|
var trickCards = destination_0;
|
|
@@ -1322,7 +1322,7 @@
|
|
|
1322
1322
|
}
|
|
1323
1323
|
var partnerPid = tmp_2;
|
|
1324
1324
|
// Inline function 'kotlin.collections.map' call
|
|
1325
|
-
var this_2 = TrickSimulator_instance.
|
|
1325
|
+
var this_2 = TrickSimulator_instance.tb7(player_0.y7y_1, trickCards, trump, table.config.rules, table.config.playersMode, playerId, partnerPid);
|
|
1326
1326
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1327
1327
|
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
1328
1328
|
var _iterator__ex2g4s_2 = this_2.t();
|
|
@@ -1334,7 +1334,7 @@
|
|
|
1334
1334
|
tmp_0 = destination_1;
|
|
1335
1335
|
} else {
|
|
1336
1336
|
// Inline function 'kotlin.collections.map' call
|
|
1337
|
-
var this_3 = player_0.
|
|
1337
|
+
var this_3 = player_0.y7y_1;
|
|
1338
1338
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1339
1339
|
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
|
|
1340
1340
|
var _iterator__ex2g4s_3 = this_3.t();
|
|
@@ -1354,25 +1354,25 @@
|
|
|
1354
1354
|
function mapToClientAction($this, action, playerId, table) {
|
|
1355
1355
|
var tmp;
|
|
1356
1356
|
if (action instanceof SelectSuit) {
|
|
1357
|
-
var tmp4_suit = action.
|
|
1358
|
-
var tmp1_$this = $this.
|
|
1357
|
+
var tmp4_suit = action.gb5_1;
|
|
1358
|
+
var tmp1_$this = $this.wb7_1;
|
|
1359
1359
|
var tmp2_player = getPlayer(table.players, playerId);
|
|
1360
1360
|
var tmp3_round = table.gameInfo.round;
|
|
1361
|
-
var tmp5_tag = tmp1_$this.
|
|
1361
|
+
var tmp5_tag = tmp1_$this.xa9(tmp3_round, tmp2_player);
|
|
1362
1362
|
tmp = new SuitChoiceFromClientAction(playerId, true, tmp5_tag, tmp4_suit);
|
|
1363
1363
|
} else {
|
|
1364
1364
|
if (action instanceof PlayCard) {
|
|
1365
|
-
var tmp6_card = action.
|
|
1366
|
-
var tmp7_combinations = findCombinationsForCard($this, action.
|
|
1367
|
-
var tmp8_tag = $this.
|
|
1365
|
+
var tmp6_card = action.eb5_1;
|
|
1366
|
+
var tmp7_combinations = findCombinationsForCard($this, action.eb5_1, playerId, table);
|
|
1367
|
+
var tmp8_tag = $this.wb7_1.ya9(table.gameInfo.round, VOID, table.cardsOnTable.g1());
|
|
1368
1368
|
tmp = new CardFromClientAction(playerId, true, tmp8_tag, tmp6_card, tmp7_combinations);
|
|
1369
1369
|
} else {
|
|
1370
1370
|
if (action instanceof AcceptCombinations) {
|
|
1371
|
-
var tmp12_isAccepted = action.
|
|
1372
|
-
var tmp9_$this = $this.
|
|
1371
|
+
var tmp12_isAccepted = action.hb5_1;
|
|
1372
|
+
var tmp9_$this = $this.wb7_1;
|
|
1373
1373
|
var tmp10_round = table.gameInfo.round;
|
|
1374
1374
|
var tmp11_sceneInfo = table.sceneInfo;
|
|
1375
|
-
var tmp13_tag = tmp9_$this.
|
|
1375
|
+
var tmp13_tag = tmp9_$this.wa9(tmp11_sceneInfo, tmp10_round);
|
|
1376
1376
|
tmp = new CombinationChoiceFromClientAction(playerId, true, tmp13_tag, tmp12_isAccepted);
|
|
1377
1377
|
} else {
|
|
1378
1378
|
noWhenBranchMatchedException();
|
|
@@ -1383,7 +1383,7 @@
|
|
|
1383
1383
|
}
|
|
1384
1384
|
function findCombinationsForCard($this, card, playerId, table) {
|
|
1385
1385
|
var player = getPlayer(table.players, playerId);
|
|
1386
|
-
var stored = player.
|
|
1386
|
+
var stored = player.b7z_1.t85_1;
|
|
1387
1387
|
var firstCardCombos = filterByCombinationState(filterWithFirstCardCombination(stored), [CombinationState_NOT_VERIFIED_getInstance()]);
|
|
1388
1388
|
var trump = table.currentTrump;
|
|
1389
1389
|
var tmp;
|
|
@@ -1433,9 +1433,9 @@
|
|
|
1433
1433
|
return tmp_2;
|
|
1434
1434
|
}
|
|
1435
1435
|
function handleWaitingAct($this, playerId, table) {
|
|
1436
|
-
if (!(table.sceneInfo.
|
|
1436
|
+
if (!(table.sceneInfo.h9f_1 === 'WAITING_ACT'))
|
|
1437
1437
|
return null;
|
|
1438
|
-
var tmp0 = table.sceneInfo.
|
|
1438
|
+
var tmp0 = table.sceneInfo.j9f_1;
|
|
1439
1439
|
var tmp$ret$0;
|
|
1440
1440
|
$l$block: {
|
|
1441
1441
|
// Inline function 'games.jass.logic.data.models.scenes.requireActData' call
|
|
@@ -1446,7 +1446,7 @@
|
|
|
1446
1446
|
throw new MechanicException('Required ' + getKClass(WaitingActData).o() + ', current act is ' + toString(tmp0));
|
|
1447
1447
|
}
|
|
1448
1448
|
var waitingActData = tmp$ret$0;
|
|
1449
|
-
var tmp0_elvis_lhs = waitingActData.
|
|
1449
|
+
var tmp0_elvis_lhs = waitingActData.n8k_1;
|
|
1450
1450
|
var tmp;
|
|
1451
1451
|
if (tmp0_elvis_lhs == null) {
|
|
1452
1452
|
return null;
|
|
@@ -1458,7 +1458,7 @@
|
|
|
1458
1458
|
if (requestPayload instanceof CardDeckRequest) {
|
|
1459
1459
|
// Inline function 'kotlin.collections.List' call
|
|
1460
1460
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1461
|
-
var size = requestPayload.
|
|
1461
|
+
var size = requestPayload.l8k_1;
|
|
1462
1462
|
var list = ArrayList_init_$Create$_0(size);
|
|
1463
1463
|
// Inline function 'kotlin.repeat' call
|
|
1464
1464
|
var inductionVariable = 0;
|
|
@@ -1466,11 +1466,11 @@
|
|
|
1466
1466
|
do {
|
|
1467
1467
|
var index = inductionVariable;
|
|
1468
1468
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1469
|
-
var tmp$ret$1 = Companion_instance.
|
|
1469
|
+
var tmp$ret$1 = Companion_instance.p95($this.vb7_1.ra9());
|
|
1470
1470
|
list.e1(tmp$ret$1);
|
|
1471
1471
|
}
|
|
1472
1472
|
while (inductionVariable < size);
|
|
1473
|
-
var tmp3_tag = $this.
|
|
1473
|
+
var tmp3_tag = $this.wb7_1.ta9(table.sceneInfo.f9f_1, table.gameInfo.round);
|
|
1474
1474
|
tmp_0 = new RequestedCardDecksFromClientAction(list, playerId, true, tmp3_tag);
|
|
1475
1475
|
} else {
|
|
1476
1476
|
noWhenBranchMatchedException();
|
|
@@ -1497,12 +1497,12 @@
|
|
|
1497
1497
|
var playerIndex = tmp$ret$1;
|
|
1498
1498
|
var partnerIndex = (playerIndex + 2 | 0) % table.players.g1() | 0;
|
|
1499
1499
|
var partnerId = table.players.h1(partnerIndex).playerId;
|
|
1500
|
-
var tmp0_tag = $this.
|
|
1500
|
+
var tmp0_tag = $this.wb7_1.ua9(table.gameInfo.round);
|
|
1501
1501
|
return new PartnerSelectedFromClientAction(playerId, true, tmp0_tag, partnerId);
|
|
1502
1502
|
}
|
|
1503
1503
|
function handleCalcPoints($this, playerId, table) {
|
|
1504
|
-
if ($this.
|
|
1505
|
-
var tmp0 = table.sceneInfo.
|
|
1504
|
+
if ($this.xb7_1 === table.gameInfo.gameNumber) {
|
|
1505
|
+
var tmp0 = table.sceneInfo.i9f_1;
|
|
1506
1506
|
var tmp$ret$0;
|
|
1507
1507
|
$l$block: {
|
|
1508
1508
|
// Inline function 'games.jass.logic.data.models.scenes.requireSceneData' call
|
|
@@ -1514,29 +1514,29 @@
|
|
|
1514
1514
|
}
|
|
1515
1515
|
var sceneData = tmp$ret$0;
|
|
1516
1516
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
1517
|
-
var tmp0_elvis_lhs = sceneData.
|
|
1517
|
+
var tmp0_elvis_lhs = sceneData.i8l_1;
|
|
1518
1518
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1519
1519
|
if (!(tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs).r()) {
|
|
1520
1520
|
return new ExitFromClientAction(playerId, true);
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
|
-
return new PlayerReadyFromClientAction(playerId, true, $this.
|
|
1523
|
+
return new PlayerReadyFromClientAction(playerId, true, $this.wb7_1.va9(table.gameInfo.round));
|
|
1524
1524
|
}
|
|
1525
1525
|
function BotPolicyAnswerProvider(policies, dealerInteractor, tagProvider, exitAfterGameNumber) {
|
|
1526
1526
|
exitAfterGameNumber = exitAfterGameNumber === VOID ? null : exitAfterGameNumber;
|
|
1527
|
-
this.
|
|
1528
|
-
this.
|
|
1529
|
-
this.
|
|
1530
|
-
this.
|
|
1527
|
+
this.ub7_1 = policies;
|
|
1528
|
+
this.vb7_1 = dealerInteractor;
|
|
1529
|
+
this.wb7_1 = tagProvider;
|
|
1530
|
+
this.xb7_1 = exitAfterGameNumber;
|
|
1531
1531
|
}
|
|
1532
|
-
protoOf(BotPolicyAnswerProvider).
|
|
1532
|
+
protoOf(BotPolicyAnswerProvider).faq = function (playerId, table) {
|
|
1533
1533
|
var waitingAction = handleWaitingAct(this, playerId, table);
|
|
1534
1534
|
if (!(waitingAction == null))
|
|
1535
1535
|
return waitingAction;
|
|
1536
|
-
if (get_isCalcPointScene(table.sceneInfo.
|
|
1536
|
+
if (get_isCalcPointScene(table.sceneInfo.f9f_1)) {
|
|
1537
1537
|
return handleCalcPoints(this, playerId, table);
|
|
1538
1538
|
}
|
|
1539
|
-
if (get_isChoosePartnerScene(table.sceneInfo.
|
|
1539
|
+
if (get_isChoosePartnerScene(table.sceneInfo.f9f_1)) {
|
|
1540
1540
|
return handleChoosePartner(this, playerId, table);
|
|
1541
1541
|
}
|
|
1542
1542
|
var tmp0 = table.players;
|
|
@@ -1556,32 +1556,32 @@
|
|
|
1556
1556
|
tmp$ret$1 = -1;
|
|
1557
1557
|
}
|
|
1558
1558
|
var seatIndex = tmp$ret$1;
|
|
1559
|
-
var policy = this.
|
|
1559
|
+
var policy = this.ub7_1[seatIndex % this.ub7_1.length | 0];
|
|
1560
1560
|
var state = mapToBotState(this, playerId, table);
|
|
1561
1561
|
var legalActions = computeLegalActions(this, playerId, table);
|
|
1562
|
-
var chosen = policy.
|
|
1562
|
+
var chosen = policy.yb7(state, legalActions);
|
|
1563
1563
|
return mapToClientAction(this, chosen, playerId, table);
|
|
1564
1564
|
};
|
|
1565
1565
|
function Companion_0() {
|
|
1566
|
-
this.
|
|
1566
|
+
this.zb7_1 = 'HeuristicBotAnswerProvider';
|
|
1567
1567
|
}
|
|
1568
1568
|
var Companion_instance_2;
|
|
1569
1569
|
function Companion_getInstance_0() {
|
|
1570
1570
|
return Companion_instance_2;
|
|
1571
1571
|
}
|
|
1572
1572
|
function HeuristicBotAnswerProvider(dealerInteractor, tagProvider, logger) {
|
|
1573
|
-
this.
|
|
1574
|
-
this.
|
|
1575
|
-
this.
|
|
1576
|
-
this.
|
|
1573
|
+
this.ab8_1 = dealerInteractor;
|
|
1574
|
+
this.bb8_1 = tagProvider;
|
|
1575
|
+
this.cb8_1 = logger;
|
|
1576
|
+
this.db8_1 = null;
|
|
1577
1577
|
}
|
|
1578
|
-
protoOf(HeuristicBotAnswerProvider).
|
|
1579
|
-
var tmp0_elvis_lhs = this.
|
|
1578
|
+
protoOf(HeuristicBotAnswerProvider).faq = function (playerId, table) {
|
|
1579
|
+
var tmp0_elvis_lhs = this.db8_1;
|
|
1580
1580
|
var tmp;
|
|
1581
1581
|
if (tmp0_elvis_lhs == null) {
|
|
1582
1582
|
// Inline function 'kotlin.run' call
|
|
1583
1583
|
var playersMode = table.config.playersMode;
|
|
1584
|
-
this.
|
|
1584
|
+
this.cb8_1.d('HeuristicBotAnswerProvider', 'Using HeuristicBotPolicy for mode=' + playersMode.z_1 + '.');
|
|
1585
1585
|
var policy = new HeuristicBotPolicy();
|
|
1586
1586
|
var tmp_0 = 0;
|
|
1587
1587
|
var tmp_1 = playersMode.count;
|
|
@@ -1592,37 +1592,37 @@
|
|
|
1592
1592
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1593
1593
|
}
|
|
1594
1594
|
// Inline function 'kotlin.also' call
|
|
1595
|
-
var this_0 = new BotPolicyAnswerProvider(tmp_2, this.
|
|
1596
|
-
this.
|
|
1595
|
+
var this_0 = new BotPolicyAnswerProvider(tmp_2, this.ab8_1, this.bb8_1);
|
|
1596
|
+
this.db8_1 = this_0;
|
|
1597
1597
|
tmp = this_0;
|
|
1598
1598
|
} else {
|
|
1599
1599
|
tmp = tmp0_elvis_lhs;
|
|
1600
1600
|
}
|
|
1601
1601
|
var answerProvider = tmp;
|
|
1602
|
-
return answerProvider.
|
|
1602
|
+
return answerProvider.faq(playerId, table);
|
|
1603
1603
|
};
|
|
1604
1604
|
function LegacyBotAnswerProvider(playerAnswerInteractor, botConfig) {
|
|
1605
|
-
this.
|
|
1606
|
-
this.
|
|
1605
|
+
this.eb8_1 = playerAnswerInteractor;
|
|
1606
|
+
this.fb8_1 = botConfig;
|
|
1607
1607
|
}
|
|
1608
|
-
protoOf(LegacyBotAnswerProvider).
|
|
1609
|
-
return this.
|
|
1608
|
+
protoOf(LegacyBotAnswerProvider).faq = function (playerId, table) {
|
|
1609
|
+
return this.eb8_1.ja9(playerId, table, this.fb8_1);
|
|
1610
1610
|
};
|
|
1611
1611
|
function getOrCreatePolicy($this, playersMode, rulesSetType) {
|
|
1612
1612
|
var cacheKey = rulesSetType.value + '_' + playersMode.z_1;
|
|
1613
1613
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1614
|
-
var this_0 = $this.
|
|
1614
|
+
var this_0 = $this.kb8_1;
|
|
1615
1615
|
var value = this_0.v2(cacheKey);
|
|
1616
1616
|
var tmp;
|
|
1617
1617
|
if (value == null) {
|
|
1618
|
-
var tmp0_safe_receiver = $this.
|
|
1619
|
-
var modelBytes = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1618
|
+
var tmp0_safe_receiver = $this.gb8_1;
|
|
1619
|
+
var modelBytes = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pb7(playersMode, rulesSetType);
|
|
1620
1620
|
var tmp_0;
|
|
1621
1621
|
if (!(modelBytes == null)) {
|
|
1622
|
-
$this.
|
|
1622
|
+
$this.jb8_1.d('PimcBotAnswerProvider', 'Using PIMC+belief for rulesSet=' + rulesSetType.value + ', mode=' + playersMode.z_1 + '.');
|
|
1623
1623
|
tmp_0 = createPimcPolicy($this, modelBytes, playersMode);
|
|
1624
1624
|
} else {
|
|
1625
|
-
$this.
|
|
1625
|
+
$this.jb8_1.d('PimcBotAnswerProvider', 'Using PIMC+uniform for rulesSet=' + rulesSetType.value + ', ' + ('mode=' + playersMode.z_1 + ' (no model \u2014 uniform sampling).'));
|
|
1626
1626
|
tmp_0 = createUniformPimcPolicy($this, playersMode);
|
|
1627
1627
|
}
|
|
1628
1628
|
var answer = tmp_0;
|
|
@@ -1637,7 +1637,7 @@
|
|
|
1637
1637
|
var inferenceEngine = new PureKotlinInferenceEngine();
|
|
1638
1638
|
var encoder = new BeliefFeatureEncoder(playersMode);
|
|
1639
1639
|
var beliefNetwork = new CardBeliefNetwork(inferenceEngine, encoder, playersMode);
|
|
1640
|
-
beliefNetwork.
|
|
1640
|
+
beliefNetwork.bb7(modelBytes);
|
|
1641
1641
|
var rolloutPolicy = new RolloutPolicy();
|
|
1642
1642
|
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, new PimcConfig());
|
|
1643
1643
|
return PimcBotPolicy_init_$Create$(pimcEngine);
|
|
@@ -1647,13 +1647,13 @@
|
|
|
1647
1647
|
var encoder = new BeliefFeatureEncoder(playersMode);
|
|
1648
1648
|
var beliefNetwork = new CardBeliefNetwork(inferenceEngine, encoder, playersMode);
|
|
1649
1649
|
var rolloutPolicy = new RolloutPolicy();
|
|
1650
|
-
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, Companion_getInstance_1().
|
|
1650
|
+
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, Companion_getInstance_1().nb8_1);
|
|
1651
1651
|
return PimcBotPolicy_init_$Create$(pimcEngine);
|
|
1652
1652
|
}
|
|
1653
1653
|
function Companion_1() {
|
|
1654
1654
|
Companion_instance_3 = this;
|
|
1655
|
-
this.
|
|
1656
|
-
this.
|
|
1655
|
+
this.mb8_1 = 'PimcBotAnswerProvider';
|
|
1656
|
+
this.nb8_1 = new PimcConfig(200);
|
|
1657
1657
|
}
|
|
1658
1658
|
var Companion_instance_3;
|
|
1659
1659
|
function Companion_getInstance_1() {
|
|
@@ -1664,23 +1664,23 @@
|
|
|
1664
1664
|
function PimcBotAnswerProvider(registry, dealerInteractor, tagProvider, logger) {
|
|
1665
1665
|
Companion_getInstance_1();
|
|
1666
1666
|
registry = registry === VOID ? null : registry;
|
|
1667
|
-
this.
|
|
1668
|
-
this.
|
|
1669
|
-
this.
|
|
1670
|
-
this.
|
|
1667
|
+
this.gb8_1 = registry;
|
|
1668
|
+
this.hb8_1 = dealerInteractor;
|
|
1669
|
+
this.ib8_1 = tagProvider;
|
|
1670
|
+
this.jb8_1 = logger;
|
|
1671
1671
|
var tmp = this;
|
|
1672
1672
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1673
|
-
tmp.
|
|
1673
|
+
tmp.kb8_1 = LinkedHashMap_init_$Create$();
|
|
1674
1674
|
var tmp_0 = this;
|
|
1675
1675
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1676
|
-
tmp_0.
|
|
1676
|
+
tmp_0.lb8_1 = LinkedHashMap_init_$Create$();
|
|
1677
1677
|
}
|
|
1678
|
-
protoOf(PimcBotAnswerProvider).
|
|
1678
|
+
protoOf(PimcBotAnswerProvider).faq = function (playerId, table) {
|
|
1679
1679
|
var playersMode = table.config.playersMode;
|
|
1680
1680
|
var rulesSetType = table.config.rulesSetType;
|
|
1681
1681
|
var cacheKey = rulesSetType.value + '_' + playersMode.z_1;
|
|
1682
1682
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1683
|
-
var this_0 = this.
|
|
1683
|
+
var this_0 = this.lb8_1;
|
|
1684
1684
|
var value = this_0.v2(cacheKey);
|
|
1685
1685
|
var tmp;
|
|
1686
1686
|
if (value == null) {
|
|
@@ -1694,14 +1694,14 @@
|
|
|
1694
1694
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1695
1695
|
}
|
|
1696
1696
|
var policies = tmp_2;
|
|
1697
|
-
var answer = new BotPolicyAnswerProvider(policies, this.
|
|
1697
|
+
var answer = new BotPolicyAnswerProvider(policies, this.hb8_1, this.ib8_1);
|
|
1698
1698
|
this_0.g3(cacheKey, answer);
|
|
1699
1699
|
tmp = answer;
|
|
1700
1700
|
} else {
|
|
1701
1701
|
tmp = value;
|
|
1702
1702
|
}
|
|
1703
1703
|
var provider = tmp;
|
|
1704
|
-
return provider.
|
|
1704
|
+
return provider.faq(playerId, table);
|
|
1705
1705
|
};
|
|
1706
1706
|
var Activation_RELU_instance;
|
|
1707
1707
|
var Activation_NONE_instance;
|
|
@@ -1714,43 +1714,43 @@
|
|
|
1714
1714
|
Activation_NONE_instance = new Activation('NONE', 1);
|
|
1715
1715
|
}
|
|
1716
1716
|
function forward($this, layer, input) {
|
|
1717
|
-
var out = new Float32Array(layer.
|
|
1717
|
+
var out = new Float32Array(layer.pb8_1);
|
|
1718
1718
|
var inductionVariable = 0;
|
|
1719
|
-
var last = layer.
|
|
1719
|
+
var last = layer.pb8_1;
|
|
1720
1720
|
if (inductionVariable < last)
|
|
1721
1721
|
do {
|
|
1722
1722
|
var j = inductionVariable;
|
|
1723
1723
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1724
|
-
var sum = layer.
|
|
1724
|
+
var sum = layer.rb8_1[j];
|
|
1725
1725
|
var inductionVariable_0 = 0;
|
|
1726
|
-
var last_0 = layer.
|
|
1726
|
+
var last_0 = layer.ob8_1;
|
|
1727
1727
|
if (inductionVariable_0 < last_0)
|
|
1728
1728
|
do {
|
|
1729
1729
|
var i = inductionVariable_0;
|
|
1730
1730
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1731
|
-
sum = sum + input[i] * layer.
|
|
1731
|
+
sum = sum + input[i] * layer.qb8_1[imul(i, layer.pb8_1) + j | 0];
|
|
1732
1732
|
}
|
|
1733
1733
|
while (inductionVariable_0 < last_0);
|
|
1734
1734
|
out[j] = sum;
|
|
1735
1735
|
}
|
|
1736
1736
|
while (inductionVariable < last);
|
|
1737
|
-
var bn = layer.
|
|
1737
|
+
var bn = layer.sb8_1;
|
|
1738
1738
|
if (!(bn == null)) {
|
|
1739
1739
|
var inductionVariable_1 = 0;
|
|
1740
|
-
var last_1 = layer.
|
|
1740
|
+
var last_1 = layer.pb8_1;
|
|
1741
1741
|
if (inductionVariable_1 < last_1)
|
|
1742
1742
|
do {
|
|
1743
1743
|
var j_0 = inductionVariable_1;
|
|
1744
1744
|
inductionVariable_1 = inductionVariable_1 + 1 | 0;
|
|
1745
|
-
var normalized = (out[j_0] - bn.
|
|
1746
|
-
out[j_0] = bn.
|
|
1745
|
+
var normalized = (out[j_0] - bn.wb8_1[j_0]) / sqrt(bn.xb8_1[j_0] + 1.0E-5);
|
|
1746
|
+
out[j_0] = bn.ub8_1[j_0] * normalized + bn.vb8_1[j_0];
|
|
1747
1747
|
}
|
|
1748
1748
|
while (inductionVariable_1 < last_1);
|
|
1749
1749
|
}
|
|
1750
|
-
switch (layer.
|
|
1750
|
+
switch (layer.tb8_1.a1_1) {
|
|
1751
1751
|
case 0:
|
|
1752
1752
|
var inductionVariable_2 = 0;
|
|
1753
|
-
var last_2 = layer.
|
|
1753
|
+
var last_2 = layer.pb8_1;
|
|
1754
1754
|
if (inductionVariable_2 < last_2)
|
|
1755
1755
|
do {
|
|
1756
1756
|
var j_1 = inductionVariable_2;
|
|
@@ -1770,23 +1770,23 @@
|
|
|
1770
1770
|
return out;
|
|
1771
1771
|
}
|
|
1772
1772
|
function Layer(inDim, outDim, weight, bias, batchNorm, activation) {
|
|
1773
|
-
this.
|
|
1774
|
-
this.
|
|
1775
|
-
this.
|
|
1776
|
-
this.
|
|
1777
|
-
this.
|
|
1778
|
-
this.
|
|
1773
|
+
this.ob8_1 = inDim;
|
|
1774
|
+
this.pb8_1 = outDim;
|
|
1775
|
+
this.qb8_1 = weight;
|
|
1776
|
+
this.rb8_1 = bias;
|
|
1777
|
+
this.sb8_1 = batchNorm;
|
|
1778
|
+
this.tb8_1 = activation;
|
|
1779
1779
|
}
|
|
1780
1780
|
protoOf(Layer).toString = function () {
|
|
1781
|
-
return 'Layer(inDim=' + this.
|
|
1781
|
+
return 'Layer(inDim=' + this.ob8_1 + ', outDim=' + this.pb8_1 + ', weight=' + toString_0(this.qb8_1) + ', bias=' + toString_0(this.rb8_1) + ', batchNorm=' + toString(this.sb8_1) + ', activation=' + this.tb8_1.toString() + ')';
|
|
1782
1782
|
};
|
|
1783
1783
|
protoOf(Layer).hashCode = function () {
|
|
1784
|
-
var result = this.
|
|
1785
|
-
result = imul(result, 31) + this.
|
|
1786
|
-
result = imul(result, 31) + hashCode(this.
|
|
1787
|
-
result = imul(result, 31) + hashCode(this.
|
|
1788
|
-
result = imul(result, 31) + (this.
|
|
1789
|
-
result = imul(result, 31) + this.
|
|
1784
|
+
var result = this.ob8_1;
|
|
1785
|
+
result = imul(result, 31) + this.pb8_1 | 0;
|
|
1786
|
+
result = imul(result, 31) + hashCode(this.qb8_1) | 0;
|
|
1787
|
+
result = imul(result, 31) + hashCode(this.rb8_1) | 0;
|
|
1788
|
+
result = imul(result, 31) + (this.sb8_1 == null ? 0 : this.sb8_1.hashCode()) | 0;
|
|
1789
|
+
result = imul(result, 31) + this.tb8_1.hashCode() | 0;
|
|
1790
1790
|
return result;
|
|
1791
1791
|
};
|
|
1792
1792
|
protoOf(Layer).equals = function (other) {
|
|
@@ -1794,34 +1794,34 @@
|
|
|
1794
1794
|
return true;
|
|
1795
1795
|
if (!(other instanceof Layer))
|
|
1796
1796
|
return false;
|
|
1797
|
-
if (!(this.
|
|
1797
|
+
if (!(this.ob8_1 === other.ob8_1))
|
|
1798
1798
|
return false;
|
|
1799
|
-
if (!(this.
|
|
1799
|
+
if (!(this.pb8_1 === other.pb8_1))
|
|
1800
1800
|
return false;
|
|
1801
|
-
if (!equals(this.
|
|
1801
|
+
if (!equals(this.qb8_1, other.qb8_1))
|
|
1802
1802
|
return false;
|
|
1803
|
-
if (!equals(this.
|
|
1803
|
+
if (!equals(this.rb8_1, other.rb8_1))
|
|
1804
1804
|
return false;
|
|
1805
|
-
if (!equals(this.
|
|
1805
|
+
if (!equals(this.sb8_1, other.sb8_1))
|
|
1806
1806
|
return false;
|
|
1807
|
-
if (!this.
|
|
1807
|
+
if (!this.tb8_1.equals(other.tb8_1))
|
|
1808
1808
|
return false;
|
|
1809
1809
|
return true;
|
|
1810
1810
|
};
|
|
1811
1811
|
function BatchNormParams(gamma, beta, runningMean, runningVar) {
|
|
1812
|
-
this.
|
|
1813
|
-
this.
|
|
1814
|
-
this.
|
|
1815
|
-
this.
|
|
1812
|
+
this.ub8_1 = gamma;
|
|
1813
|
+
this.vb8_1 = beta;
|
|
1814
|
+
this.wb8_1 = runningMean;
|
|
1815
|
+
this.xb8_1 = runningVar;
|
|
1816
1816
|
}
|
|
1817
1817
|
protoOf(BatchNormParams).toString = function () {
|
|
1818
|
-
return 'BatchNormParams(gamma=' + toString_0(this.
|
|
1818
|
+
return 'BatchNormParams(gamma=' + toString_0(this.ub8_1) + ', beta=' + toString_0(this.vb8_1) + ', runningMean=' + toString_0(this.wb8_1) + ', runningVar=' + toString_0(this.xb8_1) + ')';
|
|
1819
1819
|
};
|
|
1820
1820
|
protoOf(BatchNormParams).hashCode = function () {
|
|
1821
|
-
var result = hashCode(this.
|
|
1822
|
-
result = imul(result, 31) + hashCode(this.
|
|
1823
|
-
result = imul(result, 31) + hashCode(this.
|
|
1824
|
-
result = imul(result, 31) + hashCode(this.
|
|
1821
|
+
var result = hashCode(this.ub8_1);
|
|
1822
|
+
result = imul(result, 31) + hashCode(this.vb8_1) | 0;
|
|
1823
|
+
result = imul(result, 31) + hashCode(this.wb8_1) | 0;
|
|
1824
|
+
result = imul(result, 31) + hashCode(this.xb8_1) | 0;
|
|
1825
1825
|
return result;
|
|
1826
1826
|
};
|
|
1827
1827
|
protoOf(BatchNormParams).equals = function (other) {
|
|
@@ -1829,13 +1829,13 @@
|
|
|
1829
1829
|
return true;
|
|
1830
1830
|
if (!(other instanceof BatchNormParams))
|
|
1831
1831
|
return false;
|
|
1832
|
-
if (!equals(this.
|
|
1832
|
+
if (!equals(this.ub8_1, other.ub8_1))
|
|
1833
1833
|
return false;
|
|
1834
|
-
if (!equals(this.
|
|
1834
|
+
if (!equals(this.vb8_1, other.vb8_1))
|
|
1835
1835
|
return false;
|
|
1836
|
-
if (!equals(this.
|
|
1836
|
+
if (!equals(this.wb8_1, other.wb8_1))
|
|
1837
1837
|
return false;
|
|
1838
|
-
if (!equals(this.
|
|
1838
|
+
if (!equals(this.xb8_1, other.xb8_1))
|
|
1839
1839
|
return false;
|
|
1840
1840
|
return true;
|
|
1841
1841
|
};
|
|
@@ -1843,9 +1843,9 @@
|
|
|
1843
1843
|
Enum.call(this, name, ordinal);
|
|
1844
1844
|
}
|
|
1845
1845
|
function Companion_2() {
|
|
1846
|
-
this.
|
|
1846
|
+
this.eb7_1 = 1.0E-5;
|
|
1847
1847
|
}
|
|
1848
|
-
protoOf(Companion_2).
|
|
1848
|
+
protoOf(Companion_2).fb7 = function (logits) {
|
|
1849
1849
|
var max_0 = max(logits);
|
|
1850
1850
|
var tmp = 0;
|
|
1851
1851
|
var tmp_0 = logits.length;
|
|
@@ -1885,16 +1885,16 @@
|
|
|
1885
1885
|
return Activation_NONE_instance;
|
|
1886
1886
|
}
|
|
1887
1887
|
function PureKotlinInferenceEngine() {
|
|
1888
|
-
this.
|
|
1888
|
+
this.yb8_1 = emptyList();
|
|
1889
1889
|
}
|
|
1890
|
-
protoOf(PureKotlinInferenceEngine).
|
|
1890
|
+
protoOf(PureKotlinInferenceEngine).bb7 = function (modelBytes) {
|
|
1891
1891
|
var buf = new ByteArrayReader(modelBytes);
|
|
1892
|
-
var layerCount = buf.
|
|
1892
|
+
var layerCount = buf.bb9();
|
|
1893
1893
|
var tmp = 0;
|
|
1894
1894
|
var tmp_0 = layerCount + 1 | 0;
|
|
1895
1895
|
var tmp_1 = new Int32Array(tmp_0);
|
|
1896
1896
|
while (tmp < tmp_0) {
|
|
1897
|
-
tmp_1[tmp] = buf.
|
|
1897
|
+
tmp_1[tmp] = buf.bb9();
|
|
1898
1898
|
tmp = tmp + 1 | 0;
|
|
1899
1899
|
}
|
|
1900
1900
|
var sizes = tmp_1;
|
|
@@ -1908,11 +1908,11 @@
|
|
|
1908
1908
|
var inDim = sizes[i];
|
|
1909
1909
|
var outDim = sizes[i + 1 | 0];
|
|
1910
1910
|
var isHidden = i < (layerCount - 1 | 0);
|
|
1911
|
-
var weight = buf.
|
|
1912
|
-
var bias = buf.
|
|
1911
|
+
var weight = buf.cb9(imul(inDim, outDim));
|
|
1912
|
+
var bias = buf.cb9(outDim);
|
|
1913
1913
|
var tmp_2;
|
|
1914
1914
|
if (isHidden) {
|
|
1915
|
-
tmp_2 = new BatchNormParams(buf.
|
|
1915
|
+
tmp_2 = new BatchNormParams(buf.cb9(outDim), buf.cb9(outDim), buf.cb9(outDim), buf.cb9(outDim));
|
|
1916
1916
|
} else {
|
|
1917
1917
|
tmp_2 = null;
|
|
1918
1918
|
}
|
|
@@ -1922,17 +1922,17 @@
|
|
|
1922
1922
|
parsed.e1(element);
|
|
1923
1923
|
}
|
|
1924
1924
|
while (inductionVariable < layerCount);
|
|
1925
|
-
this.
|
|
1925
|
+
this.yb8_1 = parsed;
|
|
1926
1926
|
};
|
|
1927
|
-
protoOf(PureKotlinInferenceEngine).
|
|
1927
|
+
protoOf(PureKotlinInferenceEngine).db7 = function (input) {
|
|
1928
1928
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1929
1929
|
// Inline function 'kotlin.check' call
|
|
1930
|
-
if (!!this.
|
|
1930
|
+
if (!!this.yb8_1.r()) {
|
|
1931
1931
|
var message = 'Model not loaded. Call loadModel() first.';
|
|
1932
1932
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
1933
1933
|
}
|
|
1934
1934
|
var x = input;
|
|
1935
|
-
var _iterator__ex2g4s = this.
|
|
1935
|
+
var _iterator__ex2g4s = this.yb8_1.t();
|
|
1936
1936
|
while (_iterator__ex2g4s.u()) {
|
|
1937
1937
|
var layer = _iterator__ex2g4s.v();
|
|
1938
1938
|
x = forward(this, layer, x);
|
|
@@ -1940,34 +1940,34 @@
|
|
|
1940
1940
|
return x;
|
|
1941
1941
|
};
|
|
1942
1942
|
function ByteArrayReader(data) {
|
|
1943
|
-
this.
|
|
1944
|
-
this.
|
|
1945
|
-
}
|
|
1946
|
-
protoOf(ByteArrayReader).
|
|
1947
|
-
var _unary__edvuaz = this.
|
|
1948
|
-
this.
|
|
1949
|
-
var b0 = this.
|
|
1950
|
-
var _unary__edvuaz_0 = this.
|
|
1951
|
-
this.
|
|
1952
|
-
var b1 = this.
|
|
1953
|
-
var _unary__edvuaz_1 = this.
|
|
1954
|
-
this.
|
|
1955
|
-
var b2 = this.
|
|
1956
|
-
var _unary__edvuaz_2 = this.
|
|
1957
|
-
this.
|
|
1958
|
-
var b3 = this.
|
|
1943
|
+
this.zb8_1 = data;
|
|
1944
|
+
this.ab9_1 = 0;
|
|
1945
|
+
}
|
|
1946
|
+
protoOf(ByteArrayReader).bb9 = function () {
|
|
1947
|
+
var _unary__edvuaz = this.ab9_1;
|
|
1948
|
+
this.ab9_1 = _unary__edvuaz + 1 | 0;
|
|
1949
|
+
var b0 = this.zb8_1[_unary__edvuaz] & 255;
|
|
1950
|
+
var _unary__edvuaz_0 = this.ab9_1;
|
|
1951
|
+
this.ab9_1 = _unary__edvuaz_0 + 1 | 0;
|
|
1952
|
+
var b1 = this.zb8_1[_unary__edvuaz_0] & 255;
|
|
1953
|
+
var _unary__edvuaz_1 = this.ab9_1;
|
|
1954
|
+
this.ab9_1 = _unary__edvuaz_1 + 1 | 0;
|
|
1955
|
+
var b2 = this.zb8_1[_unary__edvuaz_1] & 255;
|
|
1956
|
+
var _unary__edvuaz_2 = this.ab9_1;
|
|
1957
|
+
this.ab9_1 = _unary__edvuaz_2 + 1 | 0;
|
|
1958
|
+
var b3 = this.zb8_1[_unary__edvuaz_2] & 255;
|
|
1959
1959
|
return b0 | b1 << 8 | b2 << 16 | b3 << 24;
|
|
1960
1960
|
};
|
|
1961
|
-
protoOf(ByteArrayReader).
|
|
1961
|
+
protoOf(ByteArrayReader).db9 = function () {
|
|
1962
1962
|
// Inline function 'kotlin.fromBits' call
|
|
1963
|
-
var bits = this.
|
|
1963
|
+
var bits = this.bb9();
|
|
1964
1964
|
return floatFromBits(bits);
|
|
1965
1965
|
};
|
|
1966
|
-
protoOf(ByteArrayReader).
|
|
1966
|
+
protoOf(ByteArrayReader).cb9 = function (size) {
|
|
1967
1967
|
var tmp = 0;
|
|
1968
1968
|
var tmp_0 = new Float32Array(size);
|
|
1969
1969
|
while (tmp < size) {
|
|
1970
|
-
tmp_0[tmp] = this.
|
|
1970
|
+
tmp_0[tmp] = this.db9();
|
|
1971
1971
|
tmp = tmp + 1 | 0;
|
|
1972
1972
|
}
|
|
1973
1973
|
return tmp_0;
|
|
@@ -1977,15 +1977,15 @@
|
|
|
1977
1977
|
return Math.sqrt(x);
|
|
1978
1978
|
}
|
|
1979
1979
|
function finishTrick($this, state) {
|
|
1980
|
-
var playersInOrder = Companion_instance_5.
|
|
1980
|
+
var playersInOrder = Companion_instance_5.pb9(state.eb9_1, state.nb9_1);
|
|
1981
1981
|
// Inline function 'kotlin.collections.map' call
|
|
1982
|
-
var this_0 = state.
|
|
1982
|
+
var this_0 = state.hb9_1;
|
|
1983
1983
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1984
1984
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1985
1985
|
var _iterator__ex2g4s = this_0.t();
|
|
1986
1986
|
while (_iterator__ex2g4s.u()) {
|
|
1987
1987
|
var item = _iterator__ex2g4s.v();
|
|
1988
|
-
var tmp$ret$0 = item.
|
|
1988
|
+
var tmp$ret$0 = item.qb9_1;
|
|
1989
1989
|
destination.e1(tmp$ret$0);
|
|
1990
1990
|
}
|
|
1991
1991
|
var alreadyPlayed = toSet(destination);
|
|
@@ -1999,8 +1999,8 @@
|
|
|
1999
1999
|
resolveTrickAndAdvance($this, state);
|
|
2000
2000
|
}
|
|
2001
2001
|
function playFullTrick($this, state) {
|
|
2002
|
-
state.
|
|
2003
|
-
var playersInOrder = Companion_instance_5.
|
|
2002
|
+
state.hb9_1.b3();
|
|
2003
|
+
var playersInOrder = Companion_instance_5.pb9(state.eb9_1, state.nb9_1);
|
|
2004
2004
|
var _iterator__ex2g4s = playersInOrder.t();
|
|
2005
2005
|
while (_iterator__ex2g4s.u()) {
|
|
2006
2006
|
var pid = _iterator__ex2g4s.v();
|
|
@@ -2009,7 +2009,7 @@
|
|
|
2009
2009
|
resolveTrickAndAdvance($this, state);
|
|
2010
2010
|
}
|
|
2011
2011
|
function playCard($this, state, playerId) {
|
|
2012
|
-
var tmp0_elvis_lhs = state.
|
|
2012
|
+
var tmp0_elvis_lhs = state.fb9_1.v2(playerId);
|
|
2013
2013
|
var tmp;
|
|
2014
2014
|
if (tmp0_elvis_lhs == null) {
|
|
2015
2015
|
return Unit_instance;
|
|
@@ -2019,15 +2019,15 @@
|
|
|
2019
2019
|
var hand = tmp;
|
|
2020
2020
|
if (hand.r())
|
|
2021
2021
|
return Unit_instance;
|
|
2022
|
-
var partnerPid = Companion_instance_5.
|
|
2022
|
+
var partnerPid = Companion_instance_5.sb9(playerId, state.eb9_1, state.kb9_1);
|
|
2023
2023
|
var partnerWinning = isPartnerWinning($this, state, partnerPid);
|
|
2024
|
-
var legalCards = TrickSimulator_instance.
|
|
2025
|
-
var useRandom = $this.
|
|
2024
|
+
var legalCards = TrickSimulator_instance.tb7(hand, state.hb9_1, state.gb9_1, state.lb9_1, state.kb9_1, playerId, partnerPid);
|
|
2025
|
+
var useRandom = $this.vb9_1 && !isFocalTeam($this, playerId, state);
|
|
2026
2026
|
var isFocal = isFocalTeam($this, playerId, state);
|
|
2027
2027
|
var tmp_0;
|
|
2028
2028
|
if (!useRandom && isFocal) {
|
|
2029
2029
|
// Inline function 'kotlin.collections.filter' call
|
|
2030
|
-
var tmp0 = state.
|
|
2030
|
+
var tmp0 = state.fb9_1.m1();
|
|
2031
2031
|
// Inline function 'kotlin.collections.filterTo' call
|
|
2032
2032
|
var destination = ArrayList_init_$Create$();
|
|
2033
2033
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -2053,50 +2053,50 @@
|
|
|
2053
2053
|
var opponentCards = tmp_0;
|
|
2054
2054
|
var tmp_1;
|
|
2055
2055
|
if (useRandom) {
|
|
2056
|
-
tmp_1 = random(legalCards, $this.
|
|
2056
|
+
tmp_1 = random(legalCards, $this.ub9_1);
|
|
2057
2057
|
} else {
|
|
2058
|
-
tmp_1 = $this.
|
|
2058
|
+
tmp_1 = $this.tb9_1.yb9(hand, legalCards, state.hb9_1, state.gb9_1, partnerPid, partnerWinning, opponentCards);
|
|
2059
2059
|
}
|
|
2060
2060
|
var card = tmp_1;
|
|
2061
2061
|
hand.y2(card);
|
|
2062
|
-
state.
|
|
2062
|
+
state.hb9_1.e1(new SimCard(playerId, card));
|
|
2063
2063
|
}
|
|
2064
2064
|
function isFocalTeam($this, playerId, state) {
|
|
2065
|
-
if (playerId === state.
|
|
2065
|
+
if (playerId === state.mb9_1)
|
|
2066
2066
|
return true;
|
|
2067
|
-
if (!state.
|
|
2067
|
+
if (!state.kb9_1.isTeamGame || !(state.eb9_1.g1() === 4))
|
|
2068
2068
|
return false;
|
|
2069
|
-
var focalIndex = state.
|
|
2070
|
-
var partnerIndex = (focalIndex + 2 | 0) % state.
|
|
2071
|
-
return playerId === state.
|
|
2069
|
+
var focalIndex = state.eb9_1.o2(state.mb9_1);
|
|
2070
|
+
var partnerIndex = (focalIndex + 2 | 0) % state.eb9_1.g1() | 0;
|
|
2071
|
+
return playerId === state.eb9_1.h1(partnerIndex);
|
|
2072
2072
|
}
|
|
2073
2073
|
function resolveTrickAndAdvance($this, state) {
|
|
2074
|
-
var result = TrickSimulator_instance.
|
|
2075
|
-
var tmp0 = state.
|
|
2076
|
-
var tmp2 = result.
|
|
2077
|
-
var tmp0_elvis_lhs = state.
|
|
2074
|
+
var result = TrickSimulator_instance.zb9(state.hb9_1, state.gb9_1);
|
|
2075
|
+
var tmp0 = state.jb9_1;
|
|
2076
|
+
var tmp2 = result.aba_1;
|
|
2077
|
+
var tmp0_elvis_lhs = state.jb9_1.v2(result.aba_1);
|
|
2078
2078
|
// Inline function 'kotlin.collections.set' call
|
|
2079
|
-
var value = (tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) + result.
|
|
2079
|
+
var value = (tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) + result.bba_1 | 0;
|
|
2080
2080
|
tmp0.g3(tmp2, value);
|
|
2081
|
-
state.
|
|
2082
|
-
state.
|
|
2083
|
-
state.
|
|
2081
|
+
state.nb9_1 = result.aba_1;
|
|
2082
|
+
state.ib9_1 = state.ib9_1 + 1 | 0;
|
|
2083
|
+
state.hb9_1.b3();
|
|
2084
2084
|
}
|
|
2085
2085
|
function computeResult($this, state) {
|
|
2086
|
-
var focalIndex = state.
|
|
2087
|
-
var n = state.
|
|
2086
|
+
var focalIndex = state.eb9_1.o2(state.mb9_1);
|
|
2087
|
+
var n = state.eb9_1.g1();
|
|
2088
2088
|
var tmp;
|
|
2089
|
-
if (state.
|
|
2089
|
+
if (state.kb9_1.isTeamGame && n === 4) {
|
|
2090
2090
|
var partnerIndex = (focalIndex + 2 | 0) % n | 0;
|
|
2091
|
-
tmp = setOf_0([state.
|
|
2091
|
+
tmp = setOf_0([state.eb9_1.h1(focalIndex), state.eb9_1.h1(partnerIndex)]);
|
|
2092
2092
|
} else {
|
|
2093
|
-
tmp = setOf(state.
|
|
2093
|
+
tmp = setOf(state.mb9_1);
|
|
2094
2094
|
}
|
|
2095
2095
|
var focalTeam = tmp;
|
|
2096
2096
|
var focalPts = 0;
|
|
2097
2097
|
var oppPts = 0;
|
|
2098
2098
|
// Inline function 'kotlin.collections.iterator' call
|
|
2099
|
-
var _iterator__ex2g4s = state.
|
|
2099
|
+
var _iterator__ex2g4s = state.jb9_1.m1().t();
|
|
2100
2100
|
while (_iterator__ex2g4s.u()) {
|
|
2101
2101
|
var _destruct__k2r9zo = _iterator__ex2g4s.v();
|
|
2102
2102
|
// Inline function 'kotlin.collections.component1' call
|
|
@@ -2111,10 +2111,10 @@
|
|
|
2111
2111
|
return new RolloutResult(focalPts, oppPts);
|
|
2112
2112
|
}
|
|
2113
2113
|
function isPartnerWinning($this, state, partnerPid) {
|
|
2114
|
-
if (partnerPid == null || state.
|
|
2114
|
+
if (partnerPid == null || state.hb9_1.r())
|
|
2115
2115
|
return false;
|
|
2116
|
-
var firstSuit = first(state.
|
|
2117
|
-
var tmp0 = state.
|
|
2116
|
+
var firstSuit = first(state.hb9_1).rb9_1.x6l();
|
|
2117
|
+
var tmp0 = state.hb9_1;
|
|
2118
2118
|
var tmp$ret$0;
|
|
2119
2119
|
$l$block_0: {
|
|
2120
2120
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -2129,10 +2129,10 @@
|
|
|
2129
2129
|
break $l$block_0;
|
|
2130
2130
|
}
|
|
2131
2131
|
var it = maxElem;
|
|
2132
|
-
var maxValue = getGrowth(it.
|
|
2132
|
+
var maxValue = getGrowth(it.rb9_1, state.gb9_1, firstSuit);
|
|
2133
2133
|
do {
|
|
2134
2134
|
var e = iterator.v();
|
|
2135
|
-
var v = getGrowth(e.
|
|
2135
|
+
var v = getGrowth(e.rb9_1, state.gb9_1, firstSuit);
|
|
2136
2136
|
if (compareTo(maxValue, v) < 0) {
|
|
2137
2137
|
maxElem = e;
|
|
2138
2138
|
maxValue = v;
|
|
@@ -2142,12 +2142,12 @@
|
|
|
2142
2142
|
tmp$ret$0 = maxElem;
|
|
2143
2143
|
}
|
|
2144
2144
|
var winner = tmp$ret$0;
|
|
2145
|
-
return (winner == null ? null : winner.
|
|
2145
|
+
return (winner == null ? null : winner.qb9_1) == partnerPid;
|
|
2146
2146
|
}
|
|
2147
2147
|
function Companion_3() {
|
|
2148
|
-
this.
|
|
2148
|
+
this.ob9_1 = 10;
|
|
2149
2149
|
}
|
|
2150
|
-
protoOf(Companion_3).
|
|
2150
|
+
protoOf(Companion_3).pb9 = function (playerOrder, leadId) {
|
|
2151
2151
|
var startIdx = coerceAtLeast_0(playerOrder.o2(leadId), 0);
|
|
2152
2152
|
// Inline function 'kotlin.collections.List' call
|
|
2153
2153
|
// Inline function 'kotlin.collections.MutableList' call
|
|
@@ -2165,7 +2165,7 @@
|
|
|
2165
2165
|
while (inductionVariable < size);
|
|
2166
2166
|
return list;
|
|
2167
2167
|
};
|
|
2168
|
-
protoOf(Companion_3).
|
|
2168
|
+
protoOf(Companion_3).sb9 = function (playerId, playerOrder, playersMode) {
|
|
2169
2169
|
if (!playersMode.isTeamGame || !(playerOrder.g1() === 4))
|
|
2170
2170
|
return null;
|
|
2171
2171
|
var idx = playerOrder.o2(playerId);
|
|
@@ -2182,15 +2182,15 @@
|
|
|
2182
2182
|
randomOpponentRollout = randomOpponentRollout === VOID ? false : randomOpponentRollout;
|
|
2183
2183
|
endgameSolver = endgameSolver === VOID ? null : endgameSolver;
|
|
2184
2184
|
endgameThreshold = endgameThreshold === VOID ? 5 : endgameThreshold;
|
|
2185
|
-
this.
|
|
2186
|
-
this.
|
|
2187
|
-
this.
|
|
2188
|
-
this.
|
|
2189
|
-
this.
|
|
2185
|
+
this.tb9_1 = rolloutPolicy;
|
|
2186
|
+
this.ub9_1 = random;
|
|
2187
|
+
this.vb9_1 = randomOpponentRollout;
|
|
2188
|
+
this.wb9_1 = endgameSolver;
|
|
2189
|
+
this.xb9_1 = endgameThreshold;
|
|
2190
2190
|
}
|
|
2191
|
-
protoOf(DeterministicRollout).
|
|
2191
|
+
protoOf(DeterministicRollout).cba = function (initialState) {
|
|
2192
2192
|
var state = initialState;
|
|
2193
|
-
var tmp0 = state.
|
|
2193
|
+
var tmp0 = state.fb9_1.x2();
|
|
2194
2194
|
var tmp$ret$0;
|
|
2195
2195
|
$l$block: {
|
|
2196
2196
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -2210,21 +2210,21 @@
|
|
|
2210
2210
|
}
|
|
2211
2211
|
var tmp0_elvis_lhs = tmp$ret$0;
|
|
2212
2212
|
var maxTricks = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
|
|
2213
|
-
var tmp = state.
|
|
2213
|
+
var tmp = state.ib9_1 + maxTricks | 0;
|
|
2214
2214
|
var tmp_0;
|
|
2215
2215
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2216
|
-
if (!state.
|
|
2216
|
+
if (!state.hb9_1.r()) {
|
|
2217
2217
|
tmp_0 = 1;
|
|
2218
2218
|
} else {
|
|
2219
2219
|
tmp_0 = 0;
|
|
2220
2220
|
}
|
|
2221
2221
|
var totalTricks = tmp + tmp_0 | 0;
|
|
2222
2222
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2223
|
-
if (!state.
|
|
2223
|
+
if (!state.hb9_1.r()) {
|
|
2224
2224
|
finishTrick(this, state);
|
|
2225
2225
|
}
|
|
2226
2226
|
$l$loop: while (true) {
|
|
2227
|
-
var tmp0_0 = state.
|
|
2227
|
+
var tmp0_0 = state.fb9_1.x2();
|
|
2228
2228
|
var tmp$ret$5;
|
|
2229
2229
|
$l$block_1: {
|
|
2230
2230
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -2252,8 +2252,8 @@
|
|
|
2252
2252
|
if (!tmp$ret$5) {
|
|
2253
2253
|
break $l$loop;
|
|
2254
2254
|
}
|
|
2255
|
-
if (!(this.
|
|
2256
|
-
var tmp1_safe_receiver = this.
|
|
2255
|
+
if (!(this.wb9_1 == null)) {
|
|
2256
|
+
var tmp1_safe_receiver = this.wb9_1.dba(state, this.xb9_1);
|
|
2257
2257
|
if (tmp1_safe_receiver == null)
|
|
2258
2258
|
null;
|
|
2259
2259
|
else {
|
|
@@ -2263,40 +2263,40 @@
|
|
|
2263
2263
|
}
|
|
2264
2264
|
playFullTrick(this, state);
|
|
2265
2265
|
}
|
|
2266
|
-
var lastTrickWinner = state.
|
|
2267
|
-
var tmp0_1 = state.
|
|
2268
|
-
var tmp2_elvis_lhs = state.
|
|
2266
|
+
var lastTrickWinner = state.nb9_1;
|
|
2267
|
+
var tmp0_1 = state.jb9_1;
|
|
2268
|
+
var tmp2_elvis_lhs = state.jb9_1.v2(lastTrickWinner);
|
|
2269
2269
|
// Inline function 'kotlin.collections.set' call
|
|
2270
2270
|
var value = (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) + 10 | 0;
|
|
2271
2271
|
tmp0_1.g3(lastTrickWinner, value);
|
|
2272
2272
|
return computeResult(this, state);
|
|
2273
2273
|
};
|
|
2274
2274
|
function RolloutState(playerOrder, hands, trump, currentTrick, trickNumber, points, playersMode, rules, focalPlayerId, leadPlayerId) {
|
|
2275
|
-
this.
|
|
2276
|
-
this.
|
|
2277
|
-
this.
|
|
2278
|
-
this.
|
|
2279
|
-
this.
|
|
2280
|
-
this.
|
|
2281
|
-
this.
|
|
2282
|
-
this.
|
|
2283
|
-
this.
|
|
2284
|
-
this.
|
|
2275
|
+
this.eb9_1 = playerOrder;
|
|
2276
|
+
this.fb9_1 = hands;
|
|
2277
|
+
this.gb9_1 = trump;
|
|
2278
|
+
this.hb9_1 = currentTrick;
|
|
2279
|
+
this.ib9_1 = trickNumber;
|
|
2280
|
+
this.jb9_1 = points;
|
|
2281
|
+
this.kb9_1 = playersMode;
|
|
2282
|
+
this.lb9_1 = rules;
|
|
2283
|
+
this.mb9_1 = focalPlayerId;
|
|
2284
|
+
this.nb9_1 = leadPlayerId;
|
|
2285
2285
|
}
|
|
2286
2286
|
protoOf(RolloutState).toString = function () {
|
|
2287
|
-
return 'RolloutState(playerOrder=' + toString_0(this.
|
|
2287
|
+
return 'RolloutState(playerOrder=' + toString_0(this.eb9_1) + ', hands=' + toString_0(this.fb9_1) + ', trump=' + this.gb9_1.toString() + ', currentTrick=' + toString_0(this.hb9_1) + ', trickNumber=' + this.ib9_1 + ', points=' + toString_0(this.jb9_1) + ', playersMode=' + this.kb9_1.toString() + ', rules=' + this.lb9_1.toString() + ', focalPlayerId=' + this.mb9_1 + ', leadPlayerId=' + this.nb9_1 + ')';
|
|
2288
2288
|
};
|
|
2289
2289
|
protoOf(RolloutState).hashCode = function () {
|
|
2290
|
-
var result = hashCode(this.
|
|
2291
|
-
result = imul(result, 31) + hashCode(this.
|
|
2292
|
-
result = imul(result, 31) + this.
|
|
2293
|
-
result = imul(result, 31) + hashCode(this.
|
|
2294
|
-
result = imul(result, 31) + this.
|
|
2295
|
-
result = imul(result, 31) + hashCode(this.
|
|
2296
|
-
result = imul(result, 31) + this.
|
|
2297
|
-
result = imul(result, 31) + this.
|
|
2298
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
2299
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
2290
|
+
var result = hashCode(this.eb9_1);
|
|
2291
|
+
result = imul(result, 31) + hashCode(this.fb9_1) | 0;
|
|
2292
|
+
result = imul(result, 31) + this.gb9_1.hashCode() | 0;
|
|
2293
|
+
result = imul(result, 31) + hashCode(this.hb9_1) | 0;
|
|
2294
|
+
result = imul(result, 31) + this.ib9_1 | 0;
|
|
2295
|
+
result = imul(result, 31) + hashCode(this.jb9_1) | 0;
|
|
2296
|
+
result = imul(result, 31) + this.kb9_1.hashCode() | 0;
|
|
2297
|
+
result = imul(result, 31) + this.lb9_1.hashCode() | 0;
|
|
2298
|
+
result = imul(result, 31) + getStringHashCode(this.mb9_1) | 0;
|
|
2299
|
+
result = imul(result, 31) + getStringHashCode(this.nb9_1) | 0;
|
|
2300
2300
|
return result;
|
|
2301
2301
|
};
|
|
2302
2302
|
protoOf(RolloutState).equals = function (other) {
|
|
@@ -2304,38 +2304,38 @@
|
|
|
2304
2304
|
return true;
|
|
2305
2305
|
if (!(other instanceof RolloutState))
|
|
2306
2306
|
return false;
|
|
2307
|
-
if (!equals(this.
|
|
2307
|
+
if (!equals(this.eb9_1, other.eb9_1))
|
|
2308
2308
|
return false;
|
|
2309
|
-
if (!equals(this.
|
|
2309
|
+
if (!equals(this.fb9_1, other.fb9_1))
|
|
2310
2310
|
return false;
|
|
2311
|
-
if (!this.
|
|
2311
|
+
if (!this.gb9_1.equals(other.gb9_1))
|
|
2312
2312
|
return false;
|
|
2313
|
-
if (!equals(this.
|
|
2313
|
+
if (!equals(this.hb9_1, other.hb9_1))
|
|
2314
2314
|
return false;
|
|
2315
|
-
if (!(this.
|
|
2315
|
+
if (!(this.ib9_1 === other.ib9_1))
|
|
2316
2316
|
return false;
|
|
2317
|
-
if (!equals(this.
|
|
2317
|
+
if (!equals(this.jb9_1, other.jb9_1))
|
|
2318
2318
|
return false;
|
|
2319
|
-
if (!this.
|
|
2319
|
+
if (!this.kb9_1.equals(other.kb9_1))
|
|
2320
2320
|
return false;
|
|
2321
|
-
if (!this.
|
|
2321
|
+
if (!this.lb9_1.equals(other.lb9_1))
|
|
2322
2322
|
return false;
|
|
2323
|
-
if (!(this.
|
|
2323
|
+
if (!(this.mb9_1 === other.mb9_1))
|
|
2324
2324
|
return false;
|
|
2325
|
-
if (!(this.
|
|
2325
|
+
if (!(this.nb9_1 === other.nb9_1))
|
|
2326
2326
|
return false;
|
|
2327
2327
|
return true;
|
|
2328
2328
|
};
|
|
2329
2329
|
function RolloutResult(focalTeamPoints, opponentTeamPoints) {
|
|
2330
|
-
this.
|
|
2331
|
-
this.
|
|
2330
|
+
this.eba_1 = focalTeamPoints;
|
|
2331
|
+
this.fba_1 = opponentTeamPoints;
|
|
2332
2332
|
}
|
|
2333
2333
|
protoOf(RolloutResult).toString = function () {
|
|
2334
|
-
return 'RolloutResult(focalTeamPoints=' + this.
|
|
2334
|
+
return 'RolloutResult(focalTeamPoints=' + this.eba_1 + ', opponentTeamPoints=' + this.fba_1 + ')';
|
|
2335
2335
|
};
|
|
2336
2336
|
protoOf(RolloutResult).hashCode = function () {
|
|
2337
|
-
var result = this.
|
|
2338
|
-
result = imul(result, 31) + this.
|
|
2337
|
+
var result = this.eba_1;
|
|
2338
|
+
result = imul(result, 31) + this.fba_1 | 0;
|
|
2339
2339
|
return result;
|
|
2340
2340
|
};
|
|
2341
2341
|
protoOf(RolloutResult).equals = function (other) {
|
|
@@ -2343,22 +2343,22 @@
|
|
|
2343
2343
|
return true;
|
|
2344
2344
|
if (!(other instanceof RolloutResult))
|
|
2345
2345
|
return false;
|
|
2346
|
-
if (!(this.
|
|
2346
|
+
if (!(this.eba_1 === other.eba_1))
|
|
2347
2347
|
return false;
|
|
2348
|
-
if (!(this.
|
|
2348
|
+
if (!(this.fba_1 === other.fba_1))
|
|
2349
2349
|
return false;
|
|
2350
2350
|
return true;
|
|
2351
2351
|
};
|
|
2352
2352
|
function WorldMoveScore(action, normalizedScore) {
|
|
2353
|
-
this.
|
|
2354
|
-
this.
|
|
2353
|
+
this.gba_1 = action;
|
|
2354
|
+
this.hba_1 = normalizedScore;
|
|
2355
2355
|
}
|
|
2356
2356
|
protoOf(WorldMoveScore).toString = function () {
|
|
2357
|
-
return 'WorldMoveScore(action=' + toString_0(this.
|
|
2357
|
+
return 'WorldMoveScore(action=' + toString_0(this.gba_1) + ', normalizedScore=' + this.hba_1 + ')';
|
|
2358
2358
|
};
|
|
2359
2359
|
protoOf(WorldMoveScore).hashCode = function () {
|
|
2360
|
-
var result = hashCode(this.
|
|
2361
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2360
|
+
var result = hashCode(this.gba_1);
|
|
2361
|
+
result = imul(result, 31) + getNumberHashCode(this.hba_1) | 0;
|
|
2362
2362
|
return result;
|
|
2363
2363
|
};
|
|
2364
2364
|
protoOf(WorldMoveScore).equals = function (other) {
|
|
@@ -2366,15 +2366,15 @@
|
|
|
2366
2366
|
return true;
|
|
2367
2367
|
if (!(other instanceof WorldMoveScore))
|
|
2368
2368
|
return false;
|
|
2369
|
-
if (!equals(this.
|
|
2369
|
+
if (!equals(this.gba_1, other.gba_1))
|
|
2370
2370
|
return false;
|
|
2371
|
-
if (!equals(this.
|
|
2371
|
+
if (!equals(this.hba_1, other.hba_1))
|
|
2372
2372
|
return false;
|
|
2373
2373
|
return true;
|
|
2374
2374
|
};
|
|
2375
2375
|
function MoveScoreAggregator() {
|
|
2376
2376
|
}
|
|
2377
|
-
protoOf(MoveScoreAggregator).
|
|
2377
|
+
protoOf(MoveScoreAggregator).iba = function (worldScores, config) {
|
|
2378
2378
|
if (worldScores.r())
|
|
2379
2379
|
return emptyMap();
|
|
2380
2380
|
// Inline function 'kotlin.collections.flatMap' call
|
|
@@ -2389,7 +2389,7 @@
|
|
|
2389
2389
|
var _iterator__ex2g4s_0 = element.t();
|
|
2390
2390
|
while (_iterator__ex2g4s_0.u()) {
|
|
2391
2391
|
var item = _iterator__ex2g4s_0.v();
|
|
2392
|
-
var tmp$ret$0 = item.
|
|
2392
|
+
var tmp$ret$0 = item.gba_1;
|
|
2393
2393
|
destination_0.e1(tmp$ret$0);
|
|
2394
2394
|
}
|
|
2395
2395
|
var list = destination_0;
|
|
@@ -2416,7 +2416,7 @@
|
|
|
2416
2416
|
var _iterator__ex2g4s_3 = item_0.t();
|
|
2417
2417
|
while (_iterator__ex2g4s_3.u()) {
|
|
2418
2418
|
var element_1 = _iterator__ex2g4s_3.v();
|
|
2419
|
-
if (equals(element_1.
|
|
2419
|
+
if (equals(element_1.gba_1, element_0)) {
|
|
2420
2420
|
tmp$ret$7 = element_1;
|
|
2421
2421
|
break $l$block;
|
|
2422
2422
|
}
|
|
@@ -2424,7 +2424,7 @@
|
|
|
2424
2424
|
tmp$ret$7 = null;
|
|
2425
2425
|
}
|
|
2426
2426
|
var tmp0_safe_receiver = tmp$ret$7;
|
|
2427
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2427
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hba_1;
|
|
2428
2428
|
var tmp$ret$8 = tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs;
|
|
2429
2429
|
destination_1.e1(tmp$ret$8);
|
|
2430
2430
|
}
|
|
@@ -2445,7 +2445,7 @@
|
|
|
2445
2445
|
destination_2.g3(tmp, tmp$ret$16);
|
|
2446
2446
|
}
|
|
2447
2447
|
var avgScores = destination_2;
|
|
2448
|
-
if (!config.
|
|
2448
|
+
if (!config.lba_1) {
|
|
2449
2449
|
return avgScores;
|
|
2450
2450
|
}
|
|
2451
2451
|
// Inline function 'kotlin.collections.associateWith' call
|
|
@@ -2500,7 +2500,7 @@
|
|
|
2500
2500
|
var tmp0_elvis_lhs = avgScores.v2(element_4);
|
|
2501
2501
|
var tmp_0 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
|
|
2502
2502
|
var tmp1_elvis_lhs_3 = maxRegrets.v2(element_4);
|
|
2503
|
-
var tmp$ret$27 = tmp_0 - config.
|
|
2503
|
+
var tmp$ret$27 = tmp_0 - config.mba_1 * (tmp1_elvis_lhs_3 == null ? 0.0 : tmp1_elvis_lhs_3);
|
|
2504
2504
|
result_1.g3(element_4, tmp$ret$27);
|
|
2505
2505
|
}
|
|
2506
2506
|
return result_1;
|
|
@@ -2516,23 +2516,23 @@
|
|
|
2516
2516
|
variancePenalty = variancePenalty === VOID ? 0.3 : variancePenalty;
|
|
2517
2517
|
randomOpponentRollout = randomOpponentRollout === VOID ? false : randomOpponentRollout;
|
|
2518
2518
|
endgameSolveThreshold = endgameSolveThreshold === VOID ? 0 : endgameSolveThreshold;
|
|
2519
|
-
this.
|
|
2520
|
-
this.
|
|
2521
|
-
this.
|
|
2522
|
-
this.
|
|
2523
|
-
this.
|
|
2524
|
-
this.
|
|
2519
|
+
this.jba_1 = worldCount;
|
|
2520
|
+
this.kba_1 = exactSolveThreshold;
|
|
2521
|
+
this.lba_1 = enableStrategyFusionMitigation;
|
|
2522
|
+
this.mba_1 = variancePenalty;
|
|
2523
|
+
this.nba_1 = randomOpponentRollout;
|
|
2524
|
+
this.oba_1 = endgameSolveThreshold;
|
|
2525
2525
|
}
|
|
2526
2526
|
protoOf(PimcConfig).toString = function () {
|
|
2527
|
-
return 'PimcConfig(worldCount=' + this.
|
|
2527
|
+
return 'PimcConfig(worldCount=' + this.jba_1 + ', exactSolveThreshold=' + this.kba_1 + ', enableStrategyFusionMitigation=' + this.lba_1 + ', variancePenalty=' + this.mba_1 + ', randomOpponentRollout=' + this.nba_1 + ', endgameSolveThreshold=' + this.oba_1 + ')';
|
|
2528
2528
|
};
|
|
2529
2529
|
protoOf(PimcConfig).hashCode = function () {
|
|
2530
|
-
var result = this.
|
|
2531
|
-
result = imul(result, 31) + this.
|
|
2532
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
2533
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2534
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
2535
|
-
result = imul(result, 31) + this.
|
|
2530
|
+
var result = this.jba_1;
|
|
2531
|
+
result = imul(result, 31) + this.kba_1 | 0;
|
|
2532
|
+
result = imul(result, 31) + getBooleanHashCode(this.lba_1) | 0;
|
|
2533
|
+
result = imul(result, 31) + getNumberHashCode(this.mba_1) | 0;
|
|
2534
|
+
result = imul(result, 31) + getBooleanHashCode(this.nba_1) | 0;
|
|
2535
|
+
result = imul(result, 31) + this.oba_1 | 0;
|
|
2536
2536
|
return result;
|
|
2537
2537
|
};
|
|
2538
2538
|
protoOf(PimcConfig).equals = function (other) {
|
|
@@ -2540,17 +2540,17 @@
|
|
|
2540
2540
|
return true;
|
|
2541
2541
|
if (!(other instanceof PimcConfig))
|
|
2542
2542
|
return false;
|
|
2543
|
-
if (!(this.
|
|
2543
|
+
if (!(this.jba_1 === other.jba_1))
|
|
2544
2544
|
return false;
|
|
2545
|
-
if (!(this.
|
|
2545
|
+
if (!(this.kba_1 === other.kba_1))
|
|
2546
2546
|
return false;
|
|
2547
|
-
if (!(this.
|
|
2547
|
+
if (!(this.lba_1 === other.lba_1))
|
|
2548
2548
|
return false;
|
|
2549
|
-
if (!equals(this.
|
|
2549
|
+
if (!equals(this.mba_1, other.mba_1))
|
|
2550
2550
|
return false;
|
|
2551
|
-
if (!(this.
|
|
2551
|
+
if (!(this.nba_1 === other.nba_1))
|
|
2552
2552
|
return false;
|
|
2553
|
-
if (!(this.
|
|
2553
|
+
if (!(this.oba_1 === other.oba_1))
|
|
2554
2554
|
return false;
|
|
2555
2555
|
return true;
|
|
2556
2556
|
};
|
|
@@ -2558,7 +2558,7 @@
|
|
|
2558
2558
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
2559
2559
|
var hands = LinkedHashMap_init_$Create$();
|
|
2560
2560
|
// Inline function 'kotlin.collections.iterator' call
|
|
2561
|
-
var _iterator__ex2g4s = world.
|
|
2561
|
+
var _iterator__ex2g4s = world.pba_1.m1().t();
|
|
2562
2562
|
while (_iterator__ex2g4s.u()) {
|
|
2563
2563
|
var _destruct__k2r9zo = _iterator__ex2g4s.v();
|
|
2564
2564
|
// Inline function 'kotlin.collections.component1' call
|
|
@@ -2569,61 +2569,61 @@
|
|
|
2569
2569
|
var value = toMutableList(cards);
|
|
2570
2570
|
hands.g3(pid, value);
|
|
2571
2571
|
}
|
|
2572
|
-
var focalHand = toMutableList(state.
|
|
2573
|
-
focalHand.y2(action.
|
|
2572
|
+
var focalHand = toMutableList(state.kb5_1);
|
|
2573
|
+
focalHand.y2(action.eb5_1);
|
|
2574
2574
|
// Inline function 'kotlin.collections.set' call
|
|
2575
|
-
var key = state.
|
|
2575
|
+
var key = state.ib5_1;
|
|
2576
2576
|
hands.g3(key, focalHand);
|
|
2577
2577
|
// Inline function 'kotlin.collections.map' call
|
|
2578
|
-
var this_0 = state.
|
|
2578
|
+
var this_0 = state.mb5_1;
|
|
2579
2579
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2580
2580
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
2581
2581
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
2582
2582
|
while (_iterator__ex2g4s_0.u()) {
|
|
2583
2583
|
var item = _iterator__ex2g4s_0.v();
|
|
2584
|
-
var tmp$ret$6 = new SimCard(item.
|
|
2584
|
+
var tmp$ret$6 = new SimCard(item.j8j_1, item.l8j_1);
|
|
2585
2585
|
destination.e1(tmp$ret$6);
|
|
2586
2586
|
}
|
|
2587
2587
|
var currentTrick = toMutableList(destination);
|
|
2588
|
-
currentTrick.e1(new SimCard(state.
|
|
2588
|
+
currentTrick.e1(new SimCard(state.ib5_1, action.eb5_1));
|
|
2589
2589
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
2590
2590
|
var points = LinkedHashMap_init_$Create$();
|
|
2591
|
-
var tmp2 = state.
|
|
2591
|
+
var tmp2 = state.ib5_1;
|
|
2592
2592
|
// Inline function 'kotlin.collections.set' call
|
|
2593
|
-
var value_0 = state.
|
|
2593
|
+
var value_0 = state.tb5_1;
|
|
2594
2594
|
points.g3(tmp2, value_0);
|
|
2595
|
-
var focalIndex = state.
|
|
2596
|
-
if (state.
|
|
2597
|
-
var oppId = state.
|
|
2595
|
+
var focalIndex = state.jb5_1.o2(state.ib5_1);
|
|
2596
|
+
if (state.jb5_1.g1() > 1) {
|
|
2597
|
+
var oppId = state.jb5_1.h1((focalIndex + 1 | 0) % state.jb5_1.g1() | 0);
|
|
2598
2598
|
// Inline function 'kotlin.collections.set' call
|
|
2599
|
-
var value_1 = state.
|
|
2599
|
+
var value_1 = state.ub5_1;
|
|
2600
2600
|
points.g3(oppId, value_1);
|
|
2601
2601
|
}
|
|
2602
2602
|
var tmp;
|
|
2603
2603
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2604
|
-
if (!state.
|
|
2605
|
-
tmp = first(state.
|
|
2604
|
+
if (!state.mb5_1.r()) {
|
|
2605
|
+
tmp = first(state.mb5_1).j8j_1;
|
|
2606
2606
|
} else {
|
|
2607
|
-
tmp = state.
|
|
2607
|
+
tmp = state.ib5_1;
|
|
2608
2608
|
}
|
|
2609
2609
|
var leadPid = tmp;
|
|
2610
|
-
var rolloutState = new RolloutState(state.
|
|
2611
|
-
var result = $this.
|
|
2612
|
-
var total = coerceAtLeast(result.
|
|
2613
|
-
return result.
|
|
2610
|
+
var rolloutState = new RolloutState(state.jb5_1, hands, trump, currentTrick, state.vb5_1, points, state.db6_1, state.cb6_1, state.ib5_1, leadPid);
|
|
2611
|
+
var result = $this.wba_1.cba(rolloutState);
|
|
2612
|
+
var total = coerceAtLeast(result.eba_1 + result.fba_1 | 0, 1.0);
|
|
2613
|
+
return result.eba_1 / total;
|
|
2614
2614
|
}
|
|
2615
2615
|
function PimcEngine(beliefNetwork, rolloutPolicy, config, random) {
|
|
2616
2616
|
config = config === VOID ? new PimcConfig() : config;
|
|
2617
2617
|
random = random === VOID ? Default_getInstance() : random;
|
|
2618
|
-
this.
|
|
2619
|
-
this.
|
|
2620
|
-
this.
|
|
2621
|
-
this.
|
|
2622
|
-
this.
|
|
2623
|
-
this.
|
|
2624
|
-
this.
|
|
2625
|
-
}
|
|
2626
|
-
protoOf(PimcEngine).
|
|
2618
|
+
this.qba_1 = beliefNetwork;
|
|
2619
|
+
this.rba_1 = rolloutPolicy;
|
|
2620
|
+
this.sba_1 = config;
|
|
2621
|
+
this.tba_1 = random;
|
|
2622
|
+
this.uba_1 = new WorldSampler(this.tba_1);
|
|
2623
|
+
this.vba_1 = this.sba_1.oba_1 > 0 ? new EndgameSolver() : null;
|
|
2624
|
+
this.wba_1 = new DeterministicRollout(this.rba_1, this.tba_1, this.sba_1.nba_1, this.vba_1, this.sba_1.oba_1);
|
|
2625
|
+
}
|
|
2626
|
+
protoOf(PimcEngine).xba = function (state, legalActions) {
|
|
2627
2627
|
if (legalActions.g1() <= 1) {
|
|
2628
2628
|
// Inline function 'kotlin.collections.associateWith' call
|
|
2629
2629
|
var result = LinkedHashMap_init_$Create$_0(coerceAtLeast_0(mapCapacity(collectionSizeOrDefault(legalActions, 10)), 16));
|
|
@@ -2657,7 +2657,7 @@
|
|
|
2657
2657
|
}
|
|
2658
2658
|
return result_0;
|
|
2659
2659
|
}
|
|
2660
|
-
var tmp0_elvis_lhs = state.
|
|
2660
|
+
var tmp0_elvis_lhs = state.nb5_1;
|
|
2661
2661
|
var tmp;
|
|
2662
2662
|
if (tmp0_elvis_lhs == null) {
|
|
2663
2663
|
// Inline function 'kotlin.collections.associateWith' call
|
|
@@ -2673,8 +2673,8 @@
|
|
|
2673
2673
|
tmp = tmp0_elvis_lhs;
|
|
2674
2674
|
}
|
|
2675
2675
|
var trump = tmp;
|
|
2676
|
-
var belief = this.
|
|
2677
|
-
var worlds = this.
|
|
2676
|
+
var belief = this.qba_1.cb7(state);
|
|
2677
|
+
var worlds = this.uba_1.zba(state, belief, this.sba_1.jba_1);
|
|
2678
2678
|
// Inline function 'kotlin.collections.map' call
|
|
2679
2679
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2680
2680
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(worlds, 10));
|
|
@@ -2694,18 +2694,18 @@
|
|
|
2694
2694
|
destination_0.e1(destination_1);
|
|
2695
2695
|
}
|
|
2696
2696
|
var worldScores = destination_0;
|
|
2697
|
-
return MoveScoreAggregator_instance.
|
|
2697
|
+
return MoveScoreAggregator_instance.iba(worldScores, this.sba_1);
|
|
2698
2698
|
};
|
|
2699
2699
|
function SimCard(playerId, card) {
|
|
2700
|
-
this.
|
|
2701
|
-
this.
|
|
2700
|
+
this.qb9_1 = playerId;
|
|
2701
|
+
this.rb9_1 = card;
|
|
2702
2702
|
}
|
|
2703
2703
|
protoOf(SimCard).toString = function () {
|
|
2704
|
-
return 'SimCard(playerId=' + this.
|
|
2704
|
+
return 'SimCard(playerId=' + this.qb9_1 + ', card=' + this.rb9_1.toString() + ')';
|
|
2705
2705
|
};
|
|
2706
2706
|
protoOf(SimCard).hashCode = function () {
|
|
2707
|
-
var result = getStringHashCode(this.
|
|
2708
|
-
result = imul(result, 31) + this.
|
|
2707
|
+
var result = getStringHashCode(this.qb9_1);
|
|
2708
|
+
result = imul(result, 31) + this.rb9_1.hashCode() | 0;
|
|
2709
2709
|
return result;
|
|
2710
2710
|
};
|
|
2711
2711
|
protoOf(SimCard).equals = function (other) {
|
|
@@ -2713,22 +2713,22 @@
|
|
|
2713
2713
|
return true;
|
|
2714
2714
|
if (!(other instanceof SimCard))
|
|
2715
2715
|
return false;
|
|
2716
|
-
if (!(this.
|
|
2716
|
+
if (!(this.qb9_1 === other.qb9_1))
|
|
2717
2717
|
return false;
|
|
2718
|
-
if (!this.
|
|
2718
|
+
if (!this.rb9_1.equals(other.rb9_1))
|
|
2719
2719
|
return false;
|
|
2720
2720
|
return true;
|
|
2721
2721
|
};
|
|
2722
2722
|
function TrickResult(winnerId, points) {
|
|
2723
|
-
this.
|
|
2724
|
-
this.
|
|
2723
|
+
this.aba_1 = winnerId;
|
|
2724
|
+
this.bba_1 = points;
|
|
2725
2725
|
}
|
|
2726
2726
|
protoOf(TrickResult).toString = function () {
|
|
2727
|
-
return 'TrickResult(winnerId=' + this.
|
|
2727
|
+
return 'TrickResult(winnerId=' + this.aba_1 + ', points=' + this.bba_1 + ')';
|
|
2728
2728
|
};
|
|
2729
2729
|
protoOf(TrickResult).hashCode = function () {
|
|
2730
|
-
var result = getStringHashCode(this.
|
|
2731
|
-
result = imul(result, 31) + this.
|
|
2730
|
+
var result = getStringHashCode(this.aba_1);
|
|
2731
|
+
result = imul(result, 31) + this.bba_1 | 0;
|
|
2732
2732
|
return result;
|
|
2733
2733
|
};
|
|
2734
2734
|
protoOf(TrickResult).equals = function (other) {
|
|
@@ -2736,9 +2736,9 @@
|
|
|
2736
2736
|
return true;
|
|
2737
2737
|
if (!(other instanceof TrickResult))
|
|
2738
2738
|
return false;
|
|
2739
|
-
if (!(this.
|
|
2739
|
+
if (!(this.aba_1 === other.aba_1))
|
|
2740
2740
|
return false;
|
|
2741
|
-
if (!(this.
|
|
2741
|
+
if (!(this.bba_1 === other.bba_1))
|
|
2742
2742
|
return false;
|
|
2743
2743
|
return true;
|
|
2744
2744
|
};
|
|
@@ -2766,14 +2766,14 @@
|
|
|
2766
2766
|
}
|
|
2767
2767
|
function TrickSimulator() {
|
|
2768
2768
|
}
|
|
2769
|
-
protoOf(TrickSimulator).
|
|
2769
|
+
protoOf(TrickSimulator).zb9 = function (cards, trump) {
|
|
2770
2770
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2771
2771
|
// Inline function 'kotlin.require' call
|
|
2772
2772
|
if (!!cards.r()) {
|
|
2773
2773
|
var message = 'Cannot resolve an empty trick';
|
|
2774
2774
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2775
2775
|
}
|
|
2776
|
-
var firstSuit = first(cards).
|
|
2776
|
+
var firstSuit = first(cards).rb9_1.x6l();
|
|
2777
2777
|
var tmp$ret$3;
|
|
2778
2778
|
$l$block_0: {
|
|
2779
2779
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -2788,10 +2788,10 @@
|
|
|
2788
2788
|
break $l$block_0;
|
|
2789
2789
|
}
|
|
2790
2790
|
var it = maxElem;
|
|
2791
|
-
var maxValue = getGrowth(it.
|
|
2791
|
+
var maxValue = getGrowth(it.rb9_1, trump, firstSuit);
|
|
2792
2792
|
do {
|
|
2793
2793
|
var e = iterator.v();
|
|
2794
|
-
var v = getGrowth(e.
|
|
2794
|
+
var v = getGrowth(e.rb9_1, trump, firstSuit);
|
|
2795
2795
|
if (compareTo(maxValue, v) < 0) {
|
|
2796
2796
|
maxElem = e;
|
|
2797
2797
|
maxValue = v;
|
|
@@ -2807,17 +2807,17 @@
|
|
|
2807
2807
|
while (_iterator__ex2g4s.u()) {
|
|
2808
2808
|
var element = _iterator__ex2g4s.v();
|
|
2809
2809
|
var tmp = sum;
|
|
2810
|
-
sum = tmp + getPoint(element.
|
|
2810
|
+
sum = tmp + getPoint(element.rb9_1, trump) | 0;
|
|
2811
2811
|
}
|
|
2812
2812
|
var points = sum;
|
|
2813
|
-
return new TrickResult(winner.
|
|
2813
|
+
return new TrickResult(winner.qb9_1, points);
|
|
2814
2814
|
};
|
|
2815
|
-
protoOf(TrickSimulator).
|
|
2815
|
+
protoOf(TrickSimulator).tb7 = function (hand, trickCards, trump, rules, playersMode, playerId, partnerPlayerId) {
|
|
2816
2816
|
if (hand.r())
|
|
2817
2817
|
return emptyList();
|
|
2818
2818
|
if (trickCards.r())
|
|
2819
2819
|
return hand;
|
|
2820
|
-
var firstSuit = first(trickCards).
|
|
2820
|
+
var firstSuit = first(trickCards).rb9_1.x6l();
|
|
2821
2821
|
var tmp$ret$0;
|
|
2822
2822
|
$l$block_0: {
|
|
2823
2823
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -2912,7 +2912,7 @@
|
|
|
2912
2912
|
var _iterator__ex2g4s_3 = trickCards.t();
|
|
2913
2913
|
while (_iterator__ex2g4s_3.u()) {
|
|
2914
2914
|
var element_3 = _iterator__ex2g4s_3.v();
|
|
2915
|
-
if (element_3.
|
|
2915
|
+
if (element_3.rb9_1.x6l().equals(trump)) {
|
|
2916
2916
|
tmp$ret$10 = true;
|
|
2917
2917
|
break $l$block_4;
|
|
2918
2918
|
}
|
|
@@ -2952,10 +2952,10 @@
|
|
|
2952
2952
|
break $l$block_6;
|
|
2953
2953
|
}
|
|
2954
2954
|
var it = maxElem;
|
|
2955
|
-
var maxValue = getGrowth(it.
|
|
2955
|
+
var maxValue = getGrowth(it.rb9_1, trump, firstSuit);
|
|
2956
2956
|
do {
|
|
2957
2957
|
var e = iterator.v();
|
|
2958
|
-
var v = getGrowth(e.
|
|
2958
|
+
var v = getGrowth(e.rb9_1, trump, firstSuit);
|
|
2959
2959
|
if (compareTo(maxValue, v) < 0) {
|
|
2960
2960
|
maxElem = e;
|
|
2961
2961
|
maxValue = v;
|
|
@@ -2972,7 +2972,7 @@
|
|
|
2972
2972
|
tmp_4 = tmp1_elvis_lhs;
|
|
2973
2973
|
}
|
|
2974
2974
|
var winningCard = tmp_4;
|
|
2975
|
-
var isPartnerWinning = playersMode.isTeamGame && winningCard.
|
|
2975
|
+
var isPartnerWinning = playersMode.isTeamGame && winningCard.qb9_1 === partnerPlayerId;
|
|
2976
2976
|
if (isPartnerWinning) {
|
|
2977
2977
|
var tmp_5;
|
|
2978
2978
|
switch (rules.trumpCardStepPartnerMode.a1_1) {
|
|
@@ -2983,7 +2983,7 @@
|
|
|
2983
2983
|
tmp_5 = candidates;
|
|
2984
2984
|
break;
|
|
2985
2985
|
case 1:
|
|
2986
|
-
tmp_5 = filterHigherTrumpOrAll(this, candidates, winningCard.
|
|
2986
|
+
tmp_5 = filterHigherTrumpOrAll(this, candidates, winningCard.rb9_1, trump, firstSuit);
|
|
2987
2987
|
break;
|
|
2988
2988
|
default:
|
|
2989
2989
|
noWhenBranchMatchedException();
|
|
@@ -2991,7 +2991,7 @@
|
|
|
2991
2991
|
}
|
|
2992
2992
|
return tmp_5;
|
|
2993
2993
|
}
|
|
2994
|
-
return filterHigherTrumpOrAll(this, candidates, winningCard.
|
|
2994
|
+
return filterHigherTrumpOrAll(this, candidates, winningCard.rb9_1, trump, firstSuit);
|
|
2995
2995
|
};
|
|
2996
2996
|
var TrickSimulator_instance;
|
|
2997
2997
|
function TrickSimulator_getInstance() {
|
|
@@ -3003,7 +3003,7 @@
|
|
|
3003
3003
|
var _iterator__ex2g4s = get_entries().t();
|
|
3004
3004
|
while (_iterator__ex2g4s.u()) {
|
|
3005
3005
|
var suit = _iterator__ex2g4s.v();
|
|
3006
|
-
var _iterator__ex2g4s_0 = $this.
|
|
3006
|
+
var _iterator__ex2g4s_0 = $this.cbb_1.t();
|
|
3007
3007
|
while (_iterator__ex2g4s_0.u()) {
|
|
3008
3008
|
var name = _iterator__ex2g4s_0.v();
|
|
3009
3009
|
var idx = imul(suit.a1_1, 8) + name.a1_1 | 0;
|
|
@@ -3032,7 +3032,7 @@
|
|
|
3032
3032
|
var currentSizes = new Int32Array(opponents.g1());
|
|
3033
3033
|
var assigned = booleanArray(32);
|
|
3034
3034
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
3035
|
-
var this_0 = get_indices_0(belief.
|
|
3035
|
+
var this_0 = get_indices_0(belief.hb7_1);
|
|
3036
3036
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
3037
3037
|
var tmp = WorldSampler$sampleOneWorld$lambda($this, belief);
|
|
3038
3038
|
var tmp$ret$4 = new sam$kotlin_Comparator$0_1(tmp);
|
|
@@ -3040,8 +3040,8 @@
|
|
|
3040
3040
|
var _iterator__ex2g4s_0 = sortedHiddenIndices.t();
|
|
3041
3041
|
$l$loop: while (_iterator__ex2g4s_0.u()) {
|
|
3042
3042
|
var rowIdx = _iterator__ex2g4s_0.v();
|
|
3043
|
-
var cardIdx = belief.
|
|
3044
|
-
var probs = belief.
|
|
3043
|
+
var cardIdx = belief.hb7_1[rowIdx];
|
|
3044
|
+
var probs = belief.gb7_1[rowIdx];
|
|
3045
3045
|
var tmp0_elvis_lhs = allCards[cardIdx];
|
|
3046
3046
|
var tmp_0;
|
|
3047
3047
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -3100,12 +3100,12 @@
|
|
|
3100
3100
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3101
3101
|
var candidates = ArrayList_init_$Create$();
|
|
3102
3102
|
var inductionVariable = 0;
|
|
3103
|
-
var last = belief.
|
|
3103
|
+
var last = belief.hb7_1.length - 1 | 0;
|
|
3104
3104
|
if (inductionVariable <= last)
|
|
3105
3105
|
$l$loop: do {
|
|
3106
3106
|
var rowIdx = inductionVariable;
|
|
3107
3107
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3108
|
-
var cardIdx = belief.
|
|
3108
|
+
var cardIdx = belief.hb7_1[rowIdx];
|
|
3109
3109
|
var tmp0_elvis_lhs = allCards[cardIdx];
|
|
3110
3110
|
var tmp;
|
|
3111
3111
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -3118,7 +3118,7 @@
|
|
|
3118
3118
|
if (voids.m2(card.x6l())) {
|
|
3119
3119
|
tmp_0 = 0.0;
|
|
3120
3120
|
} else {
|
|
3121
|
-
tmp_0 = coerceAtLeast(belief.
|
|
3121
|
+
tmp_0 = coerceAtLeast(belief.gb7_1[rowIdx][0], 1.0E-6);
|
|
3122
3122
|
}
|
|
3123
3123
|
var weight = tmp_0;
|
|
3124
3124
|
candidates.e1(new Triple(rowIdx, card, weight));
|
|
@@ -3147,7 +3147,7 @@
|
|
|
3147
3147
|
hand.e1(candidates.e3(0).un_1);
|
|
3148
3148
|
continue $l$loop_1;
|
|
3149
3149
|
}
|
|
3150
|
-
var r = $this.
|
|
3150
|
+
var r = $this.yba_1.bj() * totalWeight;
|
|
3151
3151
|
var selectedIdx = get_lastIndex(candidates);
|
|
3152
3152
|
var inductionVariable_0 = 0;
|
|
3153
3153
|
var last_0 = candidates.g1() - 1 | 0;
|
|
@@ -3167,7 +3167,7 @@
|
|
|
3167
3167
|
return new SampledWorld(mapOf(to(opponent, hand)));
|
|
3168
3168
|
}
|
|
3169
3169
|
function sampleFromDistribution($this, probs) {
|
|
3170
|
-
var r = $this.
|
|
3170
|
+
var r = $this.yba_1.cj();
|
|
3171
3171
|
var cumulative = 0.0;
|
|
3172
3172
|
var inductionVariable = 0;
|
|
3173
3173
|
var last = probs.length - 1 | 0;
|
|
@@ -3197,9 +3197,9 @@
|
|
|
3197
3197
|
}
|
|
3198
3198
|
function Companion_4() {
|
|
3199
3199
|
Companion_instance_6 = this;
|
|
3200
|
-
this.
|
|
3201
|
-
this.
|
|
3202
|
-
this.
|
|
3200
|
+
this.abb_1 = 100;
|
|
3201
|
+
this.bbb_1 = 1.0E-6;
|
|
3202
|
+
this.cbb_1 = listOf_0([CardName_ACE_getInstance(), CardName_KING_getInstance(), CardName_QUEEN_getInstance(), CardName_JACK_getInstance(), CardName_TEN_getInstance(), CardName_NINE_getInstance(), CardName_EIGHT_getInstance(), CardName_SEVEN_getInstance()]);
|
|
3203
3203
|
}
|
|
3204
3204
|
var Companion_instance_6;
|
|
3205
3205
|
function Companion_getInstance_4() {
|
|
@@ -3208,16 +3208,16 @@
|
|
|
3208
3208
|
return Companion_instance_6;
|
|
3209
3209
|
}
|
|
3210
3210
|
function sam$kotlin_Comparator$0_1(function_0) {
|
|
3211
|
-
this.
|
|
3211
|
+
this.dbb_1 = function_0;
|
|
3212
3212
|
}
|
|
3213
3213
|
protoOf(sam$kotlin_Comparator$0_1).hd = function (a, b) {
|
|
3214
|
-
return this.
|
|
3214
|
+
return this.dbb_1(a, b);
|
|
3215
3215
|
};
|
|
3216
3216
|
protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {
|
|
3217
3217
|
return this.hd(a, b);
|
|
3218
3218
|
};
|
|
3219
3219
|
protoOf(sam$kotlin_Comparator$0_1).s3 = function () {
|
|
3220
|
-
return this.
|
|
3220
|
+
return this.dbb_1;
|
|
3221
3221
|
};
|
|
3222
3222
|
protoOf(sam$kotlin_Comparator$0_1).equals = function (other) {
|
|
3223
3223
|
var tmp;
|
|
@@ -3240,18 +3240,18 @@
|
|
|
3240
3240
|
function WorldSampler$sampleOneWorld$lambda(this$0, $belief) {
|
|
3241
3241
|
return function (a, b) {
|
|
3242
3242
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
3243
|
-
var tmp = entropy(this$0, $belief.
|
|
3244
|
-
var tmp$ret$1 = entropy(this$0, $belief.
|
|
3243
|
+
var tmp = entropy(this$0, $belief.gb7_1[a]);
|
|
3244
|
+
var tmp$ret$1 = entropy(this$0, $belief.gb7_1[b]);
|
|
3245
3245
|
return compareValues(tmp, tmp$ret$1);
|
|
3246
3246
|
};
|
|
3247
3247
|
}
|
|
3248
3248
|
function WorldSampler(random) {
|
|
3249
3249
|
Companion_getInstance_4();
|
|
3250
|
-
this.
|
|
3250
|
+
this.yba_1 = random;
|
|
3251
3251
|
}
|
|
3252
|
-
protoOf(WorldSampler).
|
|
3253
|
-
var focalIndex = state.
|
|
3254
|
-
var n = state.
|
|
3252
|
+
protoOf(WorldSampler).zba = function (state, belief, worldCount) {
|
|
3253
|
+
var focalIndex = state.jb5_1.o2(state.ib5_1);
|
|
3254
|
+
var n = state.jb5_1.g1();
|
|
3255
3255
|
// Inline function 'kotlin.collections.map' call
|
|
3256
3256
|
var this_0 = until(1, n);
|
|
3257
3257
|
// Inline function 'kotlin.collections.mapTo' call
|
|
@@ -3263,7 +3263,7 @@
|
|
|
3263
3263
|
var item = inductionVariable;
|
|
3264
3264
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3265
3265
|
var absIdx = (focalIndex + item | 0) % n | 0;
|
|
3266
|
-
var tmp$ret$0 = state.
|
|
3266
|
+
var tmp$ret$0 = state.jb5_1.h1(absIdx);
|
|
3267
3267
|
destination.e1(tmp$ret$0);
|
|
3268
3268
|
}
|
|
3269
3269
|
while (!(item === last));
|
|
@@ -3274,9 +3274,9 @@
|
|
|
3274
3274
|
var _iterator__ex2g4s = opponents.t();
|
|
3275
3275
|
while (_iterator__ex2g4s.u()) {
|
|
3276
3276
|
var item_0 = _iterator__ex2g4s.v();
|
|
3277
|
-
var tmp0_elvis_lhs = state.
|
|
3277
|
+
var tmp0_elvis_lhs = state.lb5_1.v2(item_0);
|
|
3278
3278
|
var played = (tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs).g1();
|
|
3279
|
-
var tmp0 = state.
|
|
3279
|
+
var tmp0 = state.mb5_1;
|
|
3280
3280
|
var tmp$ret$3;
|
|
3281
3281
|
$l$block: {
|
|
3282
3282
|
// Inline function 'kotlin.collections.count' call
|
|
@@ -3294,7 +3294,7 @@
|
|
|
3294
3294
|
var _iterator__ex2g4s_0 = tmp0.t();
|
|
3295
3295
|
while (_iterator__ex2g4s_0.u()) {
|
|
3296
3296
|
var element = _iterator__ex2g4s_0.v();
|
|
3297
|
-
if (element.
|
|
3297
|
+
if (element.j8j_1 === item_0) {
|
|
3298
3298
|
count = count + 1 | 0;
|
|
3299
3299
|
checkCountOverflow(count);
|
|
3300
3300
|
}
|
|
@@ -3302,7 +3302,7 @@
|
|
|
3302
3302
|
tmp$ret$3 = count;
|
|
3303
3303
|
}
|
|
3304
3304
|
var onTable = tmp$ret$3;
|
|
3305
|
-
var tmp$ret$5 = coerceAtLeast_0((state.
|
|
3305
|
+
var tmp$ret$5 = coerceAtLeast_0((state.eb6_1 - played | 0) - onTable | 0, 0);
|
|
3306
3306
|
destination_0.e1(tmp$ret$5);
|
|
3307
3307
|
}
|
|
3308
3308
|
var handSizes = destination_0;
|
|
@@ -3313,7 +3313,7 @@
|
|
|
3313
3313
|
var _iterator__ex2g4s_1 = opponents.t();
|
|
3314
3314
|
while (_iterator__ex2g4s_1.u()) {
|
|
3315
3315
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
3316
|
-
var tmp0_elvis_lhs_0 = state.
|
|
3316
|
+
var tmp0_elvis_lhs_0 = state.yb5_1.v2(item_1);
|
|
3317
3317
|
var tmp$ret$8 = tmp0_elvis_lhs_0 == null ? emptySet() : tmp0_elvis_lhs_0;
|
|
3318
3318
|
destination_1.e1(tmp$ret$8);
|
|
3319
3319
|
}
|
|
@@ -3334,20 +3334,20 @@
|
|
|
3334
3334
|
return list;
|
|
3335
3335
|
};
|
|
3336
3336
|
function SampledWorld(hands) {
|
|
3337
|
-
this.
|
|
3337
|
+
this.pba_1 = hands;
|
|
3338
3338
|
}
|
|
3339
3339
|
protoOf(SampledWorld).toString = function () {
|
|
3340
|
-
return 'SampledWorld(hands=' + toString_0(this.
|
|
3340
|
+
return 'SampledWorld(hands=' + toString_0(this.pba_1) + ')';
|
|
3341
3341
|
};
|
|
3342
3342
|
protoOf(SampledWorld).hashCode = function () {
|
|
3343
|
-
return hashCode(this.
|
|
3343
|
+
return hashCode(this.pba_1);
|
|
3344
3344
|
};
|
|
3345
3345
|
protoOf(SampledWorld).equals = function (other) {
|
|
3346
3346
|
if (this === other)
|
|
3347
3347
|
return true;
|
|
3348
3348
|
if (!(other instanceof SampledWorld))
|
|
3349
3349
|
return false;
|
|
3350
|
-
if (!equals(this.
|
|
3350
|
+
if (!equals(this.pba_1, other.pba_1))
|
|
3351
3351
|
return false;
|
|
3352
3352
|
return true;
|
|
3353
3353
|
};
|
|
@@ -3361,7 +3361,7 @@
|
|
|
3361
3361
|
var _iterator__ex2g4s = get_entries().t();
|
|
3362
3362
|
while (_iterator__ex2g4s.u()) {
|
|
3363
3363
|
var suit = _iterator__ex2g4s.v();
|
|
3364
|
-
var _iterator__ex2g4s_0 = Companion_getInstance_5().
|
|
3364
|
+
var _iterator__ex2g4s_0 = Companion_getInstance_5().ibb_1.t();
|
|
3365
3365
|
while (_iterator__ex2g4s_0.u()) {
|
|
3366
3366
|
var name = _iterator__ex2g4s_0.v();
|
|
3367
3367
|
cards.e1(Companion_instance_0.a6m(suit, name));
|
|
@@ -3382,7 +3382,7 @@
|
|
|
3382
3382
|
if (hand.r())
|
|
3383
3383
|
return focalPoints;
|
|
3384
3384
|
var partnerPid = getPartnerPid($this, playerId, playOrder, playersMode);
|
|
3385
|
-
var legalCards = TrickSimulator_instance.
|
|
3385
|
+
var legalCards = TrickSimulator_instance.tb7(hand, trick, trump, rules, playersMode, playerId, partnerPid);
|
|
3386
3386
|
if (legalCards.r())
|
|
3387
3387
|
return focalPoints;
|
|
3388
3388
|
var moves = legalCards === hand ? ArrayList_init_$Create$_1(legalCards) : legalCards;
|
|
@@ -3397,17 +3397,17 @@
|
|
|
3397
3397
|
trick.e1(new SimCard(playerId, card));
|
|
3398
3398
|
var tmp_0;
|
|
3399
3399
|
if (trick.g1() >= playOrder.g1()) {
|
|
3400
|
-
var trickResult = TrickSimulator_instance.
|
|
3400
|
+
var trickResult = TrickSimulator_instance.zb9(trick, trump);
|
|
3401
3401
|
var tmp_1;
|
|
3402
|
-
if (focalTeam.m2(trickResult.
|
|
3403
|
-
tmp_1 = focalPoints + trickResult.
|
|
3402
|
+
if (focalTeam.m2(trickResult.aba_1)) {
|
|
3403
|
+
tmp_1 = focalPoints + trickResult.bba_1 | 0;
|
|
3404
3404
|
} else {
|
|
3405
3405
|
tmp_1 = focalPoints;
|
|
3406
3406
|
}
|
|
3407
3407
|
var newFocalPts = tmp_1;
|
|
3408
3408
|
var tmp_2;
|
|
3409
|
-
if (!focalTeam.m2(trickResult.
|
|
3410
|
-
tmp_2 = oppPoints + trickResult.
|
|
3409
|
+
if (!focalTeam.m2(trickResult.aba_1)) {
|
|
3410
|
+
tmp_2 = oppPoints + trickResult.bba_1 | 0;
|
|
3411
3411
|
} else {
|
|
3412
3412
|
tmp_2 = oppPoints;
|
|
3413
3413
|
}
|
|
@@ -3439,7 +3439,7 @@
|
|
|
3439
3439
|
}
|
|
3440
3440
|
if (tmp$ret$0) {
|
|
3441
3441
|
var tmp_5;
|
|
3442
|
-
if (focalTeam.m2(trickResult.
|
|
3442
|
+
if (focalTeam.m2(trickResult.aba_1)) {
|
|
3443
3443
|
tmp_5 = newFocalPts + 10 | 0;
|
|
3444
3444
|
} else {
|
|
3445
3445
|
tmp_5 = newFocalPts;
|
|
@@ -3448,7 +3448,7 @@
|
|
|
3448
3448
|
} else {
|
|
3449
3449
|
var savedTrick = ArrayList_init_$Create$_1(trick);
|
|
3450
3450
|
trick.b3();
|
|
3451
|
-
var newOrder = getPlayOrder($this, playOrder, trickResult.
|
|
3451
|
+
var newOrder = getPlayOrder($this, playOrder, trickResult.aba_1);
|
|
3452
3452
|
var s = endgameMinimax($this, hands, trick, newOrder, 0, trump, focalTeam, newFocalPts, newOppPts, rules, playersMode, a, b);
|
|
3453
3453
|
trick.b3();
|
|
3454
3454
|
trick.i1(savedTrick);
|
|
@@ -3482,12 +3482,12 @@
|
|
|
3482
3482
|
return bestScore;
|
|
3483
3483
|
}
|
|
3484
3484
|
function computeFocalTeam($this, state) {
|
|
3485
|
-
if (state.
|
|
3486
|
-
var focalIndex = state.
|
|
3485
|
+
if (state.kb9_1.isTeamGame && state.eb9_1.g1() === 4) {
|
|
3486
|
+
var focalIndex = state.eb9_1.o2(state.mb9_1);
|
|
3487
3487
|
var partnerIndex = (focalIndex + 2 | 0) % 4 | 0;
|
|
3488
|
-
return setOf_0([state.
|
|
3488
|
+
return setOf_0([state.mb9_1, state.eb9_1.h1(partnerIndex)]);
|
|
3489
3489
|
}
|
|
3490
|
-
return setOf(state.
|
|
3490
|
+
return setOf(state.mb9_1);
|
|
3491
3491
|
}
|
|
3492
3492
|
function getPlayOrder($this, playerOrder, leadId) {
|
|
3493
3493
|
var startIdx = coerceAtLeast_0(playerOrder.o2(leadId), 0);
|
|
@@ -3517,13 +3517,13 @@
|
|
|
3517
3517
|
}
|
|
3518
3518
|
function Companion_5() {
|
|
3519
3519
|
Companion_instance_7 = this;
|
|
3520
|
-
this.
|
|
3521
|
-
this.
|
|
3522
|
-
this.
|
|
3523
|
-
this.
|
|
3524
|
-
this.
|
|
3520
|
+
this.ebb_1 = 4;
|
|
3521
|
+
this.fbb_1 = 10;
|
|
3522
|
+
this.gbb_1 = 5;
|
|
3523
|
+
this.hbb_1 = 5000;
|
|
3524
|
+
this.ibb_1 = take(get_entries_0(), 8);
|
|
3525
3525
|
var tmp = this;
|
|
3526
|
-
tmp.
|
|
3526
|
+
tmp.jbb_1 = lazy(EndgameSolver$Companion$ALL_CARDS$delegate$lambda);
|
|
3527
3527
|
}
|
|
3528
3528
|
var Companion_instance_7;
|
|
3529
3529
|
function Companion_getInstance_5() {
|
|
@@ -3534,11 +3534,11 @@
|
|
|
3534
3534
|
function EndgameSolver() {
|
|
3535
3535
|
Companion_getInstance_5();
|
|
3536
3536
|
}
|
|
3537
|
-
protoOf(EndgameSolver).
|
|
3537
|
+
protoOf(EndgameSolver).dba = function (state, threshold) {
|
|
3538
3538
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
3539
|
-
if (!state.
|
|
3539
|
+
if (!state.hb9_1.r())
|
|
3540
3540
|
return null;
|
|
3541
|
-
var tmp0 = state.
|
|
3541
|
+
var tmp0 = state.fb9_1.x2();
|
|
3542
3542
|
var tmp$ret$1;
|
|
3543
3543
|
$l$block: {
|
|
3544
3544
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -3566,7 +3566,7 @@
|
|
|
3566
3566
|
var maxCards = tmp;
|
|
3567
3567
|
if (maxCards > threshold || maxCards === 0)
|
|
3568
3568
|
return null;
|
|
3569
|
-
var tmp0_0 = state.
|
|
3569
|
+
var tmp0_0 = state.fb9_1.x2();
|
|
3570
3570
|
var tmp$ret$4;
|
|
3571
3571
|
$l$block_1: {
|
|
3572
3572
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -3599,12 +3599,12 @@
|
|
|
3599
3599
|
while (_iterator__ex2g4s_0.u()) {
|
|
3600
3600
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
3601
3601
|
var tmp_1 = sum;
|
|
3602
|
-
var tmp0_elvis_lhs_0 = state.
|
|
3602
|
+
var tmp0_elvis_lhs_0 = state.jb9_1.v2(element_0);
|
|
3603
3603
|
sum = tmp_1 + (tmp0_elvis_lhs_0 == null ? 0 : tmp0_elvis_lhs_0) | 0;
|
|
3604
3604
|
}
|
|
3605
3605
|
var focalPts = sum;
|
|
3606
3606
|
// Inline function 'kotlin.collections.filter' call
|
|
3607
|
-
var tmp0_1 = state.
|
|
3607
|
+
var tmp0_1 = state.eb9_1;
|
|
3608
3608
|
// Inline function 'kotlin.collections.filterTo' call
|
|
3609
3609
|
var destination = ArrayList_init_$Create$();
|
|
3610
3610
|
var _iterator__ex2g4s_1 = tmp0_1.t();
|
|
@@ -3620,22 +3620,22 @@
|
|
|
3620
3620
|
while (_iterator__ex2g4s_2.u()) {
|
|
3621
3621
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
3622
3622
|
var tmp_2 = sum_0;
|
|
3623
|
-
var tmp0_elvis_lhs_1 = state.
|
|
3623
|
+
var tmp0_elvis_lhs_1 = state.jb9_1.v2(element_2);
|
|
3624
3624
|
sum_0 = tmp_2 + (tmp0_elvis_lhs_1 == null ? 0 : tmp0_elvis_lhs_1) | 0;
|
|
3625
3625
|
}
|
|
3626
3626
|
var oppPts = sum_0;
|
|
3627
3627
|
// Inline function 'kotlin.collections.sumOf' call
|
|
3628
3628
|
var sum_1 = 0;
|
|
3629
|
-
var _iterator__ex2g4s_3 = flatten(state.
|
|
3629
|
+
var _iterator__ex2g4s_3 = flatten(state.fb9_1.x2()).t();
|
|
3630
3630
|
while (_iterator__ex2g4s_3.u()) {
|
|
3631
3631
|
var element_3 = _iterator__ex2g4s_3.v();
|
|
3632
3632
|
var tmp_3 = sum_1;
|
|
3633
|
-
sum_1 = tmp_3 + getPoint(element_3, state.
|
|
3633
|
+
sum_1 = tmp_3 + getPoint(element_3, state.gb9_1) | 0;
|
|
3634
3634
|
}
|
|
3635
3635
|
var remainingCardPoints = sum_1;
|
|
3636
|
-
var playOrder = getPlayOrder(this, state.
|
|
3636
|
+
var playOrder = getPlayOrder(this, state.eb9_1, state.nb9_1);
|
|
3637
3637
|
// Inline function 'kotlin.collections.mapValues' call
|
|
3638
|
-
var this_0 = state.
|
|
3638
|
+
var this_0 = state.fb9_1;
|
|
3639
3639
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
3640
3640
|
var destination_0 = LinkedHashMap_init_$Create$_0(mapCapacity(this_0.g1()));
|
|
3641
3641
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -3649,12 +3649,12 @@
|
|
|
3649
3649
|
var tmp_5 = toMutableMap(destination_0);
|
|
3650
3650
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3651
3651
|
var tmp$ret$20 = ArrayList_init_$Create$();
|
|
3652
|
-
var focalFinalPoints = endgameMinimax(this, tmp_5, tmp$ret$20, playOrder, 0, state.
|
|
3652
|
+
var focalFinalPoints = endgameMinimax(this, tmp_5, tmp$ret$20, playOrder, 0, state.gb9_1, focalTeam, focalPts, oppPts, state.lb9_1, state.kb9_1, -2147483648, 2147483647);
|
|
3653
3653
|
var totalPoints = ((focalPts + oppPts | 0) + remainingCardPoints | 0) + 10 | 0;
|
|
3654
3654
|
return new RolloutResult(focalFinalPoints, totalPoints - focalFinalPoints | 0);
|
|
3655
3655
|
};
|
|
3656
3656
|
function selectCard($this, state, legalActions) {
|
|
3657
|
-
var tmp0_elvis_lhs = state.
|
|
3657
|
+
var tmp0_elvis_lhs = state.nb5_1;
|
|
3658
3658
|
var tmp;
|
|
3659
3659
|
if (tmp0_elvis_lhs == null) {
|
|
3660
3660
|
return first(legalActions);
|
|
@@ -3678,52 +3678,52 @@
|
|
|
3678
3678
|
var _iterator__ex2g4s_0 = destination.t();
|
|
3679
3679
|
while (_iterator__ex2g4s_0.u()) {
|
|
3680
3680
|
var item = _iterator__ex2g4s_0.v();
|
|
3681
|
-
var tmp$ret$2 = item.
|
|
3681
|
+
var tmp$ret$2 = item.eb5_1;
|
|
3682
3682
|
destination_0.e1(tmp$ret$2);
|
|
3683
3683
|
}
|
|
3684
3684
|
var legalCards = destination_0;
|
|
3685
3685
|
if (legalCards.r())
|
|
3686
3686
|
return first(legalActions);
|
|
3687
3687
|
// Inline function 'kotlin.collections.map' call
|
|
3688
|
-
var this_0 = state.
|
|
3688
|
+
var this_0 = state.mb5_1;
|
|
3689
3689
|
// Inline function 'kotlin.collections.mapTo' call
|
|
3690
3690
|
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
3691
3691
|
var _iterator__ex2g4s_1 = this_0.t();
|
|
3692
3692
|
while (_iterator__ex2g4s_1.u()) {
|
|
3693
3693
|
var item_0 = _iterator__ex2g4s_1.v();
|
|
3694
|
-
var tmp$ret$5 = new SimCard(item_0.
|
|
3694
|
+
var tmp$ret$5 = new SimCard(item_0.j8j_1, item_0.l8j_1);
|
|
3695
3695
|
destination_1.e1(tmp$ret$5);
|
|
3696
3696
|
}
|
|
3697
3697
|
var trickCards = destination_1;
|
|
3698
|
-
var focalIndex = state.
|
|
3698
|
+
var focalIndex = state.jb5_1.o2(state.ib5_1);
|
|
3699
3699
|
var tmp_0;
|
|
3700
|
-
if (state.
|
|
3701
|
-
tmp_0 = state.
|
|
3700
|
+
if (state.db6_1.isTeamGame && state.jb5_1.g1() === 4) {
|
|
3701
|
+
tmp_0 = state.jb5_1.h1((focalIndex + 2 | 0) % 4 | 0);
|
|
3702
3702
|
} else {
|
|
3703
3703
|
tmp_0 = null;
|
|
3704
3704
|
}
|
|
3705
3705
|
var partnerPid = tmp_0;
|
|
3706
3706
|
var partnerWinning = isPartnerWinning_0($this, trickCards, partnerPid, trump);
|
|
3707
|
-
var tmp_1 = flatten(state.
|
|
3707
|
+
var tmp_1 = flatten(state.lb5_1.x2());
|
|
3708
3708
|
// Inline function 'kotlin.collections.map' call
|
|
3709
|
-
var this_1 = state.
|
|
3709
|
+
var this_1 = state.mb5_1;
|
|
3710
3710
|
// Inline function 'kotlin.collections.mapTo' call
|
|
3711
3711
|
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
3712
3712
|
var _iterator__ex2g4s_2 = this_1.t();
|
|
3713
3713
|
while (_iterator__ex2g4s_2.u()) {
|
|
3714
3714
|
var item_1 = _iterator__ex2g4s_2.v();
|
|
3715
|
-
var tmp$ret$8 = item_1.
|
|
3715
|
+
var tmp$ret$8 = item_1.l8j_1;
|
|
3716
3716
|
destination_2.e1(tmp$ret$8);
|
|
3717
3717
|
}
|
|
3718
3718
|
var released = plus_0(tmp_1, destination_2);
|
|
3719
3719
|
// Inline function 'kotlin.collections.filter' call
|
|
3720
|
-
var tmp0 = state.
|
|
3720
|
+
var tmp0 = state.yb5_1.m1();
|
|
3721
3721
|
// Inline function 'kotlin.collections.filterTo' call
|
|
3722
3722
|
var destination_3 = ArrayList_init_$Create$();
|
|
3723
3723
|
var _iterator__ex2g4s_3 = tmp0.t();
|
|
3724
3724
|
while (_iterator__ex2g4s_3.u()) {
|
|
3725
3725
|
var element_0 = _iterator__ex2g4s_3.v();
|
|
3726
|
-
if (!(element_0.n1() === state.
|
|
3726
|
+
if (!(element_0.n1() === state.ib5_1)) {
|
|
3727
3727
|
destination_3.e1(element_0);
|
|
3728
3728
|
}
|
|
3729
3729
|
}
|
|
@@ -3737,13 +3737,13 @@
|
|
|
3737
3737
|
addAll(destination_4, list);
|
|
3738
3738
|
}
|
|
3739
3739
|
var oppVoids = toSet(destination_4);
|
|
3740
|
-
var card = $this.
|
|
3740
|
+
var card = $this.kbb_1.yb9(state.kb5_1, legalCards, trickCards, trump, partnerPid, partnerWinning, VOID, released, oppVoids);
|
|
3741
3741
|
return new PlayCard(card);
|
|
3742
3742
|
}
|
|
3743
3743
|
function isPartnerWinning_0($this, trickCards, partnerPid, trump) {
|
|
3744
3744
|
if (partnerPid == null || trickCards.r())
|
|
3745
3745
|
return false;
|
|
3746
|
-
var firstSuit = first(trickCards).
|
|
3746
|
+
var firstSuit = first(trickCards).rb9_1.x6l();
|
|
3747
3747
|
var tmp$ret$0;
|
|
3748
3748
|
$l$block_0: {
|
|
3749
3749
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -3758,10 +3758,10 @@
|
|
|
3758
3758
|
break $l$block_0;
|
|
3759
3759
|
}
|
|
3760
3760
|
var it = maxElem;
|
|
3761
|
-
var maxValue = getGrowth(it.
|
|
3761
|
+
var maxValue = getGrowth(it.rb9_1, trump, firstSuit);
|
|
3762
3762
|
do {
|
|
3763
3763
|
var e = iterator.v();
|
|
3764
|
-
var v = getGrowth(e.
|
|
3764
|
+
var v = getGrowth(e.rb9_1, trump, firstSuit);
|
|
3765
3765
|
if (compareTo(maxValue, v) < 0) {
|
|
3766
3766
|
maxElem = e;
|
|
3767
3767
|
maxValue = v;
|
|
@@ -3771,15 +3771,15 @@
|
|
|
3771
3771
|
tmp$ret$0 = maxElem;
|
|
3772
3772
|
}
|
|
3773
3773
|
var winner = tmp$ret$0;
|
|
3774
|
-
return (winner == null ? null : winner.
|
|
3774
|
+
return (winner == null ? null : winner.qb9_1) == partnerPid;
|
|
3775
3775
|
}
|
|
3776
3776
|
function HeuristicBotPolicy(circle1Threshold, circle2Threshold) {
|
|
3777
3777
|
circle1Threshold = circle1Threshold === VOID ? null : circle1Threshold;
|
|
3778
3778
|
circle2Threshold = circle2Threshold === VOID ? null : circle2Threshold;
|
|
3779
|
-
this.
|
|
3780
|
-
this.
|
|
3779
|
+
this.kbb_1 = new RolloutPolicy();
|
|
3780
|
+
this.lbb_1 = new SuitSelectionPolicy(VOID, circle1Threshold, circle2Threshold);
|
|
3781
3781
|
}
|
|
3782
|
-
protoOf(HeuristicBotPolicy).
|
|
3782
|
+
protoOf(HeuristicBotPolicy).yb7 = function (state, legalActions) {
|
|
3783
3783
|
if (legalActions.g1() === 1)
|
|
3784
3784
|
return first(legalActions);
|
|
3785
3785
|
var tmp;
|
|
@@ -3833,7 +3833,7 @@
|
|
|
3833
3833
|
tmp$ret$2 = false;
|
|
3834
3834
|
}
|
|
3835
3835
|
if (tmp$ret$2) {
|
|
3836
|
-
tmp = this.
|
|
3836
|
+
tmp = this.lbb_1.pbb(state, legalActions);
|
|
3837
3837
|
} else {
|
|
3838
3838
|
var tmp$ret$4;
|
|
3839
3839
|
$l$block_4: {
|
|
@@ -3867,7 +3867,7 @@
|
|
|
3867
3867
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
3868
3868
|
var tmp_3;
|
|
3869
3869
|
if (element_2 instanceof AcceptCombinations) {
|
|
3870
|
-
tmp_3 = element_2.
|
|
3870
|
+
tmp_3 = element_2.hb5_1;
|
|
3871
3871
|
} else {
|
|
3872
3872
|
tmp_3 = false;
|
|
3873
3873
|
}
|
|
@@ -3897,10 +3897,10 @@
|
|
|
3897
3897
|
return PimcBotPolicy_init_$Init$(pimcEngine, circle1Threshold, circle2Threshold, objectCreate(protoOf(PimcBotPolicy)));
|
|
3898
3898
|
}
|
|
3899
3899
|
function PimcBotPolicy(pimcEngine, suitSelectionPolicy) {
|
|
3900
|
-
this.
|
|
3901
|
-
this.
|
|
3900
|
+
this.qbb_1 = pimcEngine;
|
|
3901
|
+
this.rbb_1 = suitSelectionPolicy;
|
|
3902
3902
|
}
|
|
3903
|
-
protoOf(PimcBotPolicy).
|
|
3903
|
+
protoOf(PimcBotPolicy).yb7 = function (state, legalActions) {
|
|
3904
3904
|
if (legalActions.g1() === 1)
|
|
3905
3905
|
return first(legalActions);
|
|
3906
3906
|
var tmp;
|
|
@@ -3928,7 +3928,7 @@
|
|
|
3928
3928
|
tmp$ret$0 = false;
|
|
3929
3929
|
}
|
|
3930
3930
|
if (tmp$ret$0) {
|
|
3931
|
-
var scores = this.
|
|
3931
|
+
var scores = this.qbb_1.xba(state, legalActions);
|
|
3932
3932
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
3933
3933
|
var tmp0 = scores.m1();
|
|
3934
3934
|
var tmp$ret$2;
|
|
@@ -3984,7 +3984,7 @@
|
|
|
3984
3984
|
tmp$ret$6 = false;
|
|
3985
3985
|
}
|
|
3986
3986
|
if (tmp$ret$6) {
|
|
3987
|
-
tmp = this.
|
|
3987
|
+
tmp = this.rbb_1.pbb(state, legalActions);
|
|
3988
3988
|
} else {
|
|
3989
3989
|
var tmp$ret$8;
|
|
3990
3990
|
$l$block_6: {
|
|
@@ -4018,7 +4018,7 @@
|
|
|
4018
4018
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
4019
4019
|
var tmp_3;
|
|
4020
4020
|
if (element_2 instanceof AcceptCombinations) {
|
|
4021
|
-
tmp_3 = element_2.
|
|
4021
|
+
tmp_3 = element_2.hb5_1;
|
|
4022
4022
|
} else {
|
|
4023
4023
|
tmp_3 = false;
|
|
4024
4024
|
}
|
|
@@ -4298,7 +4298,7 @@
|
|
|
4298
4298
|
var _iterator__ex2g4s = legalCards.t();
|
|
4299
4299
|
while (_iterator__ex2g4s.u()) {
|
|
4300
4300
|
var element = _iterator__ex2g4s.v();
|
|
4301
|
-
if (!element.x6l().equals(trump) && Companion_getInstance_6().
|
|
4301
|
+
if (!element.x6l().equals(trump) && Companion_getInstance_6().vbb_1.m2(element.m())) {
|
|
4302
4302
|
destination.e1(element);
|
|
4303
4303
|
}
|
|
4304
4304
|
}
|
|
@@ -4596,7 +4596,7 @@
|
|
|
4596
4596
|
var tmp5_elvis_lhs = tmp_4;
|
|
4597
4597
|
var releasedTrumps = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
|
|
4598
4598
|
var accountedTrumps = myTrumps.g1() + releasedTrumps | 0;
|
|
4599
|
-
var trumpsMostlyGone = accountedTrumps >= Companion_getInstance_6().
|
|
4599
|
+
var trumpsMostlyGone = accountedTrumps >= Companion_getInstance_6().ubb_1;
|
|
4600
4600
|
// Inline function 'kotlin.collections.filter' call
|
|
4601
4601
|
// Inline function 'kotlin.collections.filterTo' call
|
|
4602
4602
|
var destination_5 = ArrayList_init_$Create$();
|
|
@@ -5093,7 +5093,7 @@
|
|
|
5093
5093
|
while (_iterator__ex2g4s.u()) {
|
|
5094
5094
|
var element = _iterator__ex2g4s.v();
|
|
5095
5095
|
// Inline function 'kotlin.collections.takeWhile' call
|
|
5096
|
-
var this_0 = Companion_getInstance_6().
|
|
5096
|
+
var this_0 = Companion_getInstance_6().wbb_1;
|
|
5097
5097
|
var list = ArrayList_init_$Create$();
|
|
5098
5098
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
5099
5099
|
$l$loop: while (_iterator__ex2g4s_0.u()) {
|
|
@@ -5212,7 +5212,7 @@
|
|
|
5212
5212
|
return tmp$ret$11;
|
|
5213
5213
|
}
|
|
5214
5214
|
function selectFollow($this, hand, legalCards, currentTrick, trump, partnerWinning) {
|
|
5215
|
-
var firstSuit = first(currentTrick).
|
|
5215
|
+
var firstSuit = first(currentTrick).rb9_1.x6l();
|
|
5216
5216
|
if (partnerWinning) {
|
|
5217
5217
|
var tmp$ret$0;
|
|
5218
5218
|
$l$block_0: {
|
|
@@ -5248,10 +5248,10 @@
|
|
|
5248
5248
|
if (!iterator_0.u())
|
|
5249
5249
|
throw NoSuchElementException_init_$Create$();
|
|
5250
5250
|
var it_0 = iterator_0.v();
|
|
5251
|
-
var maxValue = getGrowth(it_0.
|
|
5251
|
+
var maxValue = getGrowth(it_0.rb9_1, trump, firstSuit);
|
|
5252
5252
|
while (iterator_0.u()) {
|
|
5253
5253
|
var it_1 = iterator_0.v();
|
|
5254
|
-
var v_0 = getGrowth(it_1.
|
|
5254
|
+
var v_0 = getGrowth(it_1.rb9_1, trump, firstSuit);
|
|
5255
5255
|
if (compareTo(maxValue, v_0) < 0) {
|
|
5256
5256
|
maxValue = v_0;
|
|
5257
5257
|
}
|
|
@@ -5376,11 +5376,11 @@
|
|
|
5376
5376
|
}
|
|
5377
5377
|
function Companion_6() {
|
|
5378
5378
|
Companion_instance_8 = this;
|
|
5379
|
-
this.
|
|
5380
|
-
this.
|
|
5381
|
-
this.
|
|
5382
|
-
this.
|
|
5383
|
-
this.
|
|
5379
|
+
this.sbb_1 = 8;
|
|
5380
|
+
this.tbb_1 = 3;
|
|
5381
|
+
this.ubb_1 = numberToInt(8 * 0.8);
|
|
5382
|
+
this.vbb_1 = setOf_0([CardName_KING_getInstance(), CardName_QUEEN_getInstance()]);
|
|
5383
|
+
this.wbb_1 = listOf_0([CardName_ACE_getInstance(), CardName_TEN_getInstance(), CardName_KING_getInstance(), CardName_QUEEN_getInstance(), CardName_JACK_getInstance(), CardName_NINE_getInstance(), CardName_EIGHT_getInstance(), CardName_SEVEN_getInstance()]);
|
|
5384
5384
|
}
|
|
5385
5385
|
var Companion_instance_8;
|
|
5386
5386
|
function Companion_getInstance_6() {
|
|
@@ -5389,16 +5389,16 @@
|
|
|
5389
5389
|
return Companion_instance_8;
|
|
5390
5390
|
}
|
|
5391
5391
|
function sam$kotlin_Comparator$0_2(function_0) {
|
|
5392
|
-
this.
|
|
5392
|
+
this.xbb_1 = function_0;
|
|
5393
5393
|
}
|
|
5394
5394
|
protoOf(sam$kotlin_Comparator$0_2).hd = function (a, b) {
|
|
5395
|
-
return this.
|
|
5395
|
+
return this.xbb_1(a, b);
|
|
5396
5396
|
};
|
|
5397
5397
|
protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {
|
|
5398
5398
|
return this.hd(a, b);
|
|
5399
5399
|
};
|
|
5400
5400
|
protoOf(sam$kotlin_Comparator$0_2).s3 = function () {
|
|
5401
|
-
return this.
|
|
5401
|
+
return this.xbb_1;
|
|
5402
5402
|
};
|
|
5403
5403
|
protoOf(sam$kotlin_Comparator$0_2).equals = function (other) {
|
|
5404
5404
|
var tmp;
|
|
@@ -5419,16 +5419,16 @@
|
|
|
5419
5419
|
return hashCode(this.s3());
|
|
5420
5420
|
};
|
|
5421
5421
|
function sam$kotlin_Comparator$0_3(function_0) {
|
|
5422
|
-
this.
|
|
5422
|
+
this.ybb_1 = function_0;
|
|
5423
5423
|
}
|
|
5424
5424
|
protoOf(sam$kotlin_Comparator$0_3).hd = function (a, b) {
|
|
5425
|
-
return this.
|
|
5425
|
+
return this.ybb_1(a, b);
|
|
5426
5426
|
};
|
|
5427
5427
|
protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {
|
|
5428
5428
|
return this.hd(a, b);
|
|
5429
5429
|
};
|
|
5430
5430
|
protoOf(sam$kotlin_Comparator$0_3).s3 = function () {
|
|
5431
|
-
return this.
|
|
5431
|
+
return this.ybb_1;
|
|
5432
5432
|
};
|
|
5433
5433
|
protoOf(sam$kotlin_Comparator$0_3).equals = function (other) {
|
|
5434
5434
|
var tmp;
|
|
@@ -5449,16 +5449,16 @@
|
|
|
5449
5449
|
return hashCode(this.s3());
|
|
5450
5450
|
};
|
|
5451
5451
|
function sam$kotlin_Comparator$0_4(function_0) {
|
|
5452
|
-
this.
|
|
5452
|
+
this.zbb_1 = function_0;
|
|
5453
5453
|
}
|
|
5454
5454
|
protoOf(sam$kotlin_Comparator$0_4).hd = function (a, b) {
|
|
5455
|
-
return this.
|
|
5455
|
+
return this.zbb_1(a, b);
|
|
5456
5456
|
};
|
|
5457
5457
|
protoOf(sam$kotlin_Comparator$0_4).compare = function (a, b) {
|
|
5458
5458
|
return this.hd(a, b);
|
|
5459
5459
|
};
|
|
5460
5460
|
protoOf(sam$kotlin_Comparator$0_4).s3 = function () {
|
|
5461
|
-
return this.
|
|
5461
|
+
return this.zbb_1;
|
|
5462
5462
|
};
|
|
5463
5463
|
protoOf(sam$kotlin_Comparator$0_4).equals = function (other) {
|
|
5464
5464
|
var tmp;
|
|
@@ -5479,16 +5479,16 @@
|
|
|
5479
5479
|
return hashCode(this.s3());
|
|
5480
5480
|
};
|
|
5481
5481
|
function sam$kotlin_Comparator$0_5(function_0) {
|
|
5482
|
-
this.
|
|
5482
|
+
this.abc_1 = function_0;
|
|
5483
5483
|
}
|
|
5484
5484
|
protoOf(sam$kotlin_Comparator$0_5).hd = function (a, b) {
|
|
5485
|
-
return this.
|
|
5485
|
+
return this.abc_1(a, b);
|
|
5486
5486
|
};
|
|
5487
5487
|
protoOf(sam$kotlin_Comparator$0_5).compare = function (a, b) {
|
|
5488
5488
|
return this.hd(a, b);
|
|
5489
5489
|
};
|
|
5490
5490
|
protoOf(sam$kotlin_Comparator$0_5).s3 = function () {
|
|
5491
|
-
return this.
|
|
5491
|
+
return this.abc_1;
|
|
5492
5492
|
};
|
|
5493
5493
|
protoOf(sam$kotlin_Comparator$0_5).equals = function (other) {
|
|
5494
5494
|
var tmp;
|
|
@@ -5509,16 +5509,16 @@
|
|
|
5509
5509
|
return hashCode(this.s3());
|
|
5510
5510
|
};
|
|
5511
5511
|
function sam$kotlin_Comparator$0_6(function_0) {
|
|
5512
|
-
this.
|
|
5512
|
+
this.bbc_1 = function_0;
|
|
5513
5513
|
}
|
|
5514
5514
|
protoOf(sam$kotlin_Comparator$0_6).hd = function (a, b) {
|
|
5515
|
-
return this.
|
|
5515
|
+
return this.bbc_1(a, b);
|
|
5516
5516
|
};
|
|
5517
5517
|
protoOf(sam$kotlin_Comparator$0_6).compare = function (a, b) {
|
|
5518
5518
|
return this.hd(a, b);
|
|
5519
5519
|
};
|
|
5520
5520
|
protoOf(sam$kotlin_Comparator$0_6).s3 = function () {
|
|
5521
|
-
return this.
|
|
5521
|
+
return this.bbc_1;
|
|
5522
5522
|
};
|
|
5523
5523
|
protoOf(sam$kotlin_Comparator$0_6).equals = function (other) {
|
|
5524
5524
|
var tmp;
|
|
@@ -5993,7 +5993,7 @@
|
|
|
5993
5993
|
function RolloutPolicy() {
|
|
5994
5994
|
Companion_getInstance_6();
|
|
5995
5995
|
}
|
|
5996
|
-
protoOf(RolloutPolicy).
|
|
5996
|
+
protoOf(RolloutPolicy).cbc = function (hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids) {
|
|
5997
5997
|
if (legalCards.g1() === 1)
|
|
5998
5998
|
return first(legalCards);
|
|
5999
5999
|
var tmp;
|
|
@@ -6010,11 +6010,11 @@
|
|
|
6010
6010
|
}
|
|
6011
6011
|
return tmp;
|
|
6012
6012
|
};
|
|
6013
|
-
protoOf(RolloutPolicy).
|
|
6013
|
+
protoOf(RolloutPolicy).yb9 = function (hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids, $super) {
|
|
6014
6014
|
opponentCards = opponentCards === VOID ? null : opponentCards;
|
|
6015
6015
|
releasedCards = releasedCards === VOID ? null : releasedCards;
|
|
6016
6016
|
opponentVoids = opponentVoids === VOID ? null : opponentVoids;
|
|
6017
|
-
return $super === VOID ? this.
|
|
6017
|
+
return $super === VOID ? this.cbc(hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids) : $super.cbc.call(this, hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids);
|
|
6018
6018
|
};
|
|
6019
6019
|
function buildEffectiveCards($this, ownCards, trumpCard, suit, circle) {
|
|
6020
6020
|
if (!(circle === 1) || trumpCard == null || !trumpCard.x6l().equals(suit))
|
|
@@ -6022,9 +6022,9 @@
|
|
|
6022
6022
|
return plus(ownCards, trumpCard);
|
|
6023
6023
|
}
|
|
6024
6024
|
function evaluateSuit($this, effectiveCards, trump, trumpCard) {
|
|
6025
|
-
var trumpControl = $this.
|
|
6026
|
-
var sideSuitPower = $this.
|
|
6027
|
-
var distributionBonus = $this.
|
|
6025
|
+
var trumpControl = $this.mbb_1.nae(effectiveCards, trump);
|
|
6026
|
+
var sideSuitPower = $this.mbb_1.oae(effectiveCards, trump);
|
|
6027
|
+
var distributionBonus = $this.mbb_1.pae(effectiveCards, trump);
|
|
6028
6028
|
var tmp;
|
|
6029
6029
|
if (!(trumpCard == null) && trumpCard.x6l().equals(trump)) {
|
|
6030
6030
|
tmp = getPoint(trumpCard, trump);
|
|
@@ -6035,10 +6035,10 @@
|
|
|
6035
6035
|
return trumpControl + sideSuitPower + distributionBonus + trumpCardPointBonus;
|
|
6036
6036
|
}
|
|
6037
6037
|
function getThreshold($this, mode, circle) {
|
|
6038
|
-
if (circle <= 1 && !($this.
|
|
6039
|
-
return $this.
|
|
6040
|
-
if (circle > 1 && !($this.
|
|
6041
|
-
return $this.
|
|
6038
|
+
if (circle <= 1 && !($this.nbb_1 == null))
|
|
6039
|
+
return $this.nbb_1;
|
|
6040
|
+
if (circle > 1 && !($this.obb_1 == null))
|
|
6041
|
+
return $this.obb_1;
|
|
6042
6042
|
var _destruct__k2r9zo;
|
|
6043
6043
|
switch (mode.a1_1) {
|
|
6044
6044
|
case 0:
|
|
@@ -6059,11 +6059,11 @@
|
|
|
6059
6059
|
calculator = calculator === VOID ? new HandStrengthCalculatorImpl() : calculator;
|
|
6060
6060
|
circle1Override = circle1Override === VOID ? null : circle1Override;
|
|
6061
6061
|
circle2Override = circle2Override === VOID ? null : circle2Override;
|
|
6062
|
-
this.
|
|
6063
|
-
this.
|
|
6064
|
-
this.
|
|
6062
|
+
this.mbb_1 = calculator;
|
|
6063
|
+
this.nbb_1 = circle1Override;
|
|
6064
|
+
this.obb_1 = circle2Override;
|
|
6065
6065
|
}
|
|
6066
|
-
protoOf(SuitSelectionPolicy).
|
|
6066
|
+
protoOf(SuitSelectionPolicy).pbb = function (state, legalActions) {
|
|
6067
6067
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
6068
6068
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
6069
6069
|
var destination = ArrayList_init_$Create$();
|
|
@@ -6085,7 +6085,7 @@
|
|
|
6085
6085
|
var _iterator__ex2g4s_0 = suitActions.t();
|
|
6086
6086
|
while (_iterator__ex2g4s_0.u()) {
|
|
6087
6087
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
6088
|
-
if (element_0.
|
|
6088
|
+
if (element_0.gb5_1 == null) {
|
|
6089
6089
|
tmp$ret$3 = element_0;
|
|
6090
6090
|
break $l$block;
|
|
6091
6091
|
}
|
|
@@ -6099,7 +6099,7 @@
|
|
|
6099
6099
|
var _iterator__ex2g4s_1 = suitActions.t();
|
|
6100
6100
|
while (_iterator__ex2g4s_1.u()) {
|
|
6101
6101
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
6102
|
-
if (!(element_1.
|
|
6102
|
+
if (!(element_1.gb5_1 == null)) {
|
|
6103
6103
|
destination_0.e1(element_1);
|
|
6104
6104
|
}
|
|
6105
6105
|
}
|
|
@@ -6108,10 +6108,10 @@
|
|
|
6108
6108
|
return passAction == null ? first(suitActions) : passAction;
|
|
6109
6109
|
}
|
|
6110
6110
|
var tmp;
|
|
6111
|
-
if (state.
|
|
6111
|
+
if (state.qb5_1.r()) {
|
|
6112
6112
|
tmp = 1;
|
|
6113
6113
|
} else {
|
|
6114
|
-
var tmp0 = state.
|
|
6114
|
+
var tmp0 = state.qb5_1;
|
|
6115
6115
|
var tmp$ret$7;
|
|
6116
6116
|
$l$block_0: {
|
|
6117
6117
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -6120,9 +6120,9 @@
|
|
|
6120
6120
|
tmp$ret$7 = null;
|
|
6121
6121
|
break $l$block_0;
|
|
6122
6122
|
}
|
|
6123
|
-
var maxValue = iterator.v().
|
|
6123
|
+
var maxValue = iterator.v().hb6_1;
|
|
6124
6124
|
while (iterator.u()) {
|
|
6125
|
-
var v = iterator.v().
|
|
6125
|
+
var v = iterator.v().hb6_1;
|
|
6126
6126
|
if (compareTo(maxValue, v) < 0) {
|
|
6127
6127
|
maxValue = v;
|
|
6128
6128
|
}
|
|
@@ -6133,7 +6133,7 @@
|
|
|
6133
6133
|
tmp = tmp2_elvis_lhs == null ? 1 : tmp2_elvis_lhs;
|
|
6134
6134
|
}
|
|
6135
6135
|
var circle = tmp;
|
|
6136
|
-
var threshold = getThreshold(this, state.
|
|
6136
|
+
var threshold = getThreshold(this, state.db6_1, circle);
|
|
6137
6137
|
var bestSuit = null;
|
|
6138
6138
|
var bestScore = 0.0;
|
|
6139
6139
|
var bestUngatedSuit = null;
|
|
@@ -6141,7 +6141,7 @@
|
|
|
6141
6141
|
var _iterator__ex2g4s_2 = declareActions.t();
|
|
6142
6142
|
$l$loop_0: while (_iterator__ex2g4s_2.u()) {
|
|
6143
6143
|
var action = _iterator__ex2g4s_2.v();
|
|
6144
|
-
var tmp3_elvis_lhs = action.
|
|
6144
|
+
var tmp3_elvis_lhs = action.gb5_1;
|
|
6145
6145
|
var tmp_0;
|
|
6146
6146
|
if (tmp3_elvis_lhs == null) {
|
|
6147
6147
|
continue $l$loop_0;
|
|
@@ -6149,13 +6149,13 @@
|
|
|
6149
6149
|
tmp_0 = tmp3_elvis_lhs;
|
|
6150
6150
|
}
|
|
6151
6151
|
var suit = tmp_0;
|
|
6152
|
-
var effectiveCards = buildEffectiveCards(this, state.
|
|
6153
|
-
var score = evaluateSuit(this, effectiveCards, suit, state.
|
|
6152
|
+
var effectiveCards = buildEffectiveCards(this, state.kb5_1, state.ob5_1, suit, circle);
|
|
6153
|
+
var score = evaluateSuit(this, effectiveCards, suit, state.ob5_1);
|
|
6154
6154
|
if (score > bestUngatedScore) {
|
|
6155
6155
|
bestUngatedScore = score;
|
|
6156
6156
|
bestUngatedSuit = suit;
|
|
6157
6157
|
}
|
|
6158
|
-
if (!this.
|
|
6158
|
+
if (!this.dbc(effectiveCards, suit, circle))
|
|
6159
6159
|
continue $l$loop_0;
|
|
6160
6160
|
if (score > bestScore) {
|
|
6161
6161
|
bestScore = score;
|
|
@@ -6173,7 +6173,7 @@
|
|
|
6173
6173
|
}
|
|
6174
6174
|
return tmp_1;
|
|
6175
6175
|
};
|
|
6176
|
-
protoOf(SuitSelectionPolicy).
|
|
6176
|
+
protoOf(SuitSelectionPolicy).dbc = function (effectiveCards, trump, circle) {
|
|
6177
6177
|
// Inline function 'kotlin.collections.filter' call
|
|
6178
6178
|
// Inline function 'kotlin.collections.filterTo' call
|
|
6179
6179
|
var destination = ArrayList_init_$Create$();
|