client_plugin_logic_deb 1.8.477 → 1.8.478
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/Logic_Debertz-ai_module.js +285 -285
- package/Logic_Debertz-bot_engine.js +728 -723
- package/Logic_Debertz-bot_engine.js.map +1 -1
- package/Logic_Debertz-client_plugin.d.ts +78 -31
- package/Logic_Debertz-client_plugin.js +2071 -2071
- package/Logic_Debertz-core.js +1998 -1665
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +14550 -13751
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.js +6917 -6923
- package/Logic_Debertz-game_client.js.map +1 -1
- package/Logic_Debertz-game_server.js +1112 -1112
- package/kotlinx-coroutines-core.js +1 -1
- package/package.json +1 -1
|
@@ -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.qb6_1 = card;
|
|
213
|
+
this.rb6_1 = combinations;
|
|
214
214
|
}
|
|
215
215
|
protoOf(PlayCard).toString = function () {
|
|
216
|
-
return 'PlayCard(card=' + this.
|
|
216
|
+
return 'PlayCard(card=' + this.qb6_1.toString() + ', combinations=' + toString(this.rb6_1) + ')';
|
|
217
217
|
};
|
|
218
218
|
protoOf(PlayCard).hashCode = function () {
|
|
219
|
-
var result = this.
|
|
220
|
-
result = imul(result, 31) + (this.
|
|
219
|
+
var result = this.qb6_1.hashCode();
|
|
220
|
+
result = imul(result, 31) + (this.rb6_1 == null ? 0 : hashCode(this.rb6_1)) | 0;
|
|
221
221
|
return result;
|
|
222
222
|
};
|
|
223
223
|
protoOf(PlayCard).equals = function (other) {
|
|
@@ -225,110 +225,112 @@
|
|
|
225
225
|
return true;
|
|
226
226
|
if (!(other instanceof PlayCard))
|
|
227
227
|
return false;
|
|
228
|
-
if (!this.
|
|
228
|
+
if (!this.qb6_1.equals(other.qb6_1))
|
|
229
229
|
return false;
|
|
230
|
-
if (!equals(this.
|
|
230
|
+
if (!equals(this.rb6_1, other.rb6_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.sb6_1 = suit;
|
|
237
237
|
}
|
|
238
238
|
protoOf(SelectSuit).toString = function () {
|
|
239
|
-
return 'SelectSuit(suit=' + toString(this.
|
|
239
|
+
return 'SelectSuit(suit=' + toString(this.sb6_1) + ')';
|
|
240
240
|
};
|
|
241
241
|
protoOf(SelectSuit).hashCode = function () {
|
|
242
|
-
return this.
|
|
242
|
+
return this.sb6_1 == null ? 0 : this.sb6_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.sb6_1, other.sb6_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.tb6_1 = isAccepted;
|
|
256
256
|
}
|
|
257
257
|
protoOf(AcceptCombinations).toString = function () {
|
|
258
|
-
return 'AcceptCombinations(isAccepted=' + this.
|
|
258
|
+
return 'AcceptCombinations(isAccepted=' + this.tb6_1 + ')';
|
|
259
259
|
};
|
|
260
260
|
protoOf(AcceptCombinations).hashCode = function () {
|
|
261
|
-
return getBooleanHashCode(this.
|
|
261
|
+
return getBooleanHashCode(this.tb6_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.tb6_1 === other.tb6_1))
|
|
269
269
|
return false;
|
|
270
270
|
return true;
|
|
271
271
|
};
|
|
272
272
|
function BotAction() {
|
|
273
273
|
}
|
|
274
|
-
function BotGameState(focalPlayerId, playerOrder, ownCards, playedCards, currentTrick, trump, trumpCard, isTrumpDeclarer, suitSelectionHistory, ownTeamScore, opponentTeamScore, ownRoundPoints, opponentRoundPoints, trickNumber, positionInTrick, ownTeamWonLastTrick, suitVoids, trumpTakenInFirstCircle, trumpDeclarerId, declaredCombinations, rules, playersMode, handSize) {
|
|
274
|
+
function BotGameState(focalPlayerId, playerOrder, ownCards, playedCards, currentTrick, trump, trumpCard, isTrumpDeclarer, suitSelectionHistory, ownTeamScore, opponentTeamScore, ownRoundPoints, opponentRoundPoints, trickNumber, positionInTrick, ownTeamWonLastTrick, suitVoids, trumpTakenInFirstCircle, trumpDeclarerId, declaredCombinations, rules, playersMode, handSize, pointsMode) {
|
|
275
275
|
trumpCard = trumpCard === VOID ? null : trumpCard;
|
|
276
276
|
suitSelectionHistory = suitSelectionHistory === VOID ? emptyList() : suitSelectionHistory;
|
|
277
277
|
suitVoids = suitVoids === VOID ? emptyMap() : suitVoids;
|
|
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.ub6_1 = focalPlayerId;
|
|
282
|
+
this.vb6_1 = playerOrder;
|
|
283
|
+
this.wb6_1 = ownCards;
|
|
284
|
+
this.xb6_1 = playedCards;
|
|
285
|
+
this.yb6_1 = currentTrick;
|
|
286
|
+
this.zb6_1 = trump;
|
|
287
|
+
this.ab7_1 = trumpCard;
|
|
288
|
+
this.bb7_1 = isTrumpDeclarer;
|
|
289
|
+
this.cb7_1 = suitSelectionHistory;
|
|
290
|
+
this.db7_1 = ownTeamScore;
|
|
291
|
+
this.eb7_1 = opponentTeamScore;
|
|
292
|
+
this.fb7_1 = ownRoundPoints;
|
|
293
|
+
this.gb7_1 = opponentRoundPoints;
|
|
294
|
+
this.hb7_1 = trickNumber;
|
|
295
|
+
this.ib7_1 = positionInTrick;
|
|
296
|
+
this.jb7_1 = ownTeamWonLastTrick;
|
|
297
|
+
this.kb7_1 = suitVoids;
|
|
298
|
+
this.lb7_1 = trumpTakenInFirstCircle;
|
|
299
|
+
this.mb7_1 = trumpDeclarerId;
|
|
300
|
+
this.nb7_1 = declaredCombinations;
|
|
301
|
+
this.ob7_1 = rules;
|
|
302
|
+
this.pb7_1 = playersMode;
|
|
303
|
+
this.qb7_1 = handSize;
|
|
304
|
+
this.rb7_1 = pointsMode;
|
|
304
305
|
}
|
|
305
306
|
protoOf(BotGameState).toString = function () {
|
|
306
|
-
return 'BotGameState(focalPlayerId=' + this.
|
|
307
|
+
return 'BotGameState(focalPlayerId=' + this.ub6_1 + ', playerOrder=' + toString_0(this.vb6_1) + ', ownCards=' + toString_0(this.wb6_1) + ', playedCards=' + toString_0(this.xb6_1) + ', currentTrick=' + toString_0(this.yb6_1) + ', trump=' + toString(this.zb6_1) + ', trumpCard=' + toString(this.ab7_1) + ', isTrumpDeclarer=' + this.bb7_1 + ', suitSelectionHistory=' + toString_0(this.cb7_1) + ', ownTeamScore=' + this.db7_1 + ', opponentTeamScore=' + this.eb7_1 + ', ownRoundPoints=' + this.fb7_1 + ', opponentRoundPoints=' + this.gb7_1 + ', trickNumber=' + this.hb7_1 + ', positionInTrick=' + this.ib7_1 + ', ownTeamWonLastTrick=' + this.jb7_1 + ', suitVoids=' + toString_0(this.kb7_1) + ', trumpTakenInFirstCircle=' + this.lb7_1 + ', trumpDeclarerId=' + this.mb7_1 + ', declaredCombinations=' + toString_0(this.nb7_1) + ', rules=' + this.ob7_1.toString() + ', playersMode=' + this.pb7_1.toString() + ', handSize=' + this.qb7_1 + ', pointsMode=' + this.rb7_1.toString() + ')';
|
|
307
308
|
};
|
|
308
309
|
protoOf(BotGameState).hashCode = function () {
|
|
309
|
-
var result = getStringHashCode(this.
|
|
310
|
-
result = imul(result, 31) + hashCode(this.
|
|
311
|
-
result = imul(result, 31) + hashCode(this.
|
|
312
|
-
result = imul(result, 31) + hashCode(this.
|
|
313
|
-
result = imul(result, 31) + hashCode(this.
|
|
314
|
-
result = imul(result, 31) + (this.
|
|
315
|
-
result = imul(result, 31) + (this.
|
|
316
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
317
|
-
result = imul(result, 31) + hashCode(this.
|
|
318
|
-
result = imul(result, 31) + this.
|
|
319
|
-
result = imul(result, 31) + this.
|
|
320
|
-
result = imul(result, 31) + this.
|
|
321
|
-
result = imul(result, 31) + this.
|
|
322
|
-
result = imul(result, 31) + this.
|
|
323
|
-
result = imul(result, 31) + this.
|
|
324
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
325
|
-
result = imul(result, 31) + hashCode(this.
|
|
326
|
-
result = imul(result, 31) + (this.
|
|
327
|
-
result = imul(result, 31) + (this.
|
|
328
|
-
result = imul(result, 31) + hashCode(this.
|
|
329
|
-
result = imul(result, 31) + this.
|
|
330
|
-
result = imul(result, 31) + this.
|
|
331
|
-
result = imul(result, 31) + this.
|
|
310
|
+
var result = getStringHashCode(this.ub6_1);
|
|
311
|
+
result = imul(result, 31) + hashCode(this.vb6_1) | 0;
|
|
312
|
+
result = imul(result, 31) + hashCode(this.wb6_1) | 0;
|
|
313
|
+
result = imul(result, 31) + hashCode(this.xb6_1) | 0;
|
|
314
|
+
result = imul(result, 31) + hashCode(this.yb6_1) | 0;
|
|
315
|
+
result = imul(result, 31) + (this.zb6_1 == null ? 0 : this.zb6_1.hashCode()) | 0;
|
|
316
|
+
result = imul(result, 31) + (this.ab7_1 == null ? 0 : this.ab7_1.hashCode()) | 0;
|
|
317
|
+
result = imul(result, 31) + getBooleanHashCode(this.bb7_1) | 0;
|
|
318
|
+
result = imul(result, 31) + hashCode(this.cb7_1) | 0;
|
|
319
|
+
result = imul(result, 31) + this.db7_1 | 0;
|
|
320
|
+
result = imul(result, 31) + this.eb7_1 | 0;
|
|
321
|
+
result = imul(result, 31) + this.fb7_1 | 0;
|
|
322
|
+
result = imul(result, 31) + this.gb7_1 | 0;
|
|
323
|
+
result = imul(result, 31) + this.hb7_1 | 0;
|
|
324
|
+
result = imul(result, 31) + this.ib7_1 | 0;
|
|
325
|
+
result = imul(result, 31) + getBooleanHashCode(this.jb7_1) | 0;
|
|
326
|
+
result = imul(result, 31) + hashCode(this.kb7_1) | 0;
|
|
327
|
+
result = imul(result, 31) + (this.lb7_1 == null ? 0 : getBooleanHashCode(this.lb7_1)) | 0;
|
|
328
|
+
result = imul(result, 31) + (this.mb7_1 == null ? 0 : getStringHashCode(this.mb7_1)) | 0;
|
|
329
|
+
result = imul(result, 31) + hashCode(this.nb7_1) | 0;
|
|
330
|
+
result = imul(result, 31) + this.ob7_1.hashCode() | 0;
|
|
331
|
+
result = imul(result, 31) + this.pb7_1.hashCode() | 0;
|
|
332
|
+
result = imul(result, 31) + this.qb7_1 | 0;
|
|
333
|
+
result = imul(result, 31) + this.rb7_1.hashCode() | 0;
|
|
332
334
|
return result;
|
|
333
335
|
};
|
|
334
336
|
protoOf(BotGameState).equals = function (other) {
|
|
@@ -336,66 +338,68 @@
|
|
|
336
338
|
return true;
|
|
337
339
|
if (!(other instanceof BotGameState))
|
|
338
340
|
return false;
|
|
339
|
-
if (!(this.
|
|
341
|
+
if (!(this.ub6_1 === other.ub6_1))
|
|
340
342
|
return false;
|
|
341
|
-
if (!equals(this.
|
|
343
|
+
if (!equals(this.vb6_1, other.vb6_1))
|
|
342
344
|
return false;
|
|
343
|
-
if (!equals(this.
|
|
345
|
+
if (!equals(this.wb6_1, other.wb6_1))
|
|
344
346
|
return false;
|
|
345
|
-
if (!equals(this.
|
|
347
|
+
if (!equals(this.xb6_1, other.xb6_1))
|
|
346
348
|
return false;
|
|
347
|
-
if (!equals(this.
|
|
349
|
+
if (!equals(this.yb6_1, other.yb6_1))
|
|
348
350
|
return false;
|
|
349
|
-
if (!equals(this.
|
|
351
|
+
if (!equals(this.zb6_1, other.zb6_1))
|
|
350
352
|
return false;
|
|
351
|
-
if (!equals(this.
|
|
353
|
+
if (!equals(this.ab7_1, other.ab7_1))
|
|
352
354
|
return false;
|
|
353
|
-
if (!(this.
|
|
355
|
+
if (!(this.bb7_1 === other.bb7_1))
|
|
354
356
|
return false;
|
|
355
|
-
if (!equals(this.
|
|
357
|
+
if (!equals(this.cb7_1, other.cb7_1))
|
|
356
358
|
return false;
|
|
357
|
-
if (!(this.
|
|
359
|
+
if (!(this.db7_1 === other.db7_1))
|
|
358
360
|
return false;
|
|
359
|
-
if (!(this.
|
|
361
|
+
if (!(this.eb7_1 === other.eb7_1))
|
|
360
362
|
return false;
|
|
361
|
-
if (!(this.
|
|
363
|
+
if (!(this.fb7_1 === other.fb7_1))
|
|
362
364
|
return false;
|
|
363
|
-
if (!(this.
|
|
365
|
+
if (!(this.gb7_1 === other.gb7_1))
|
|
364
366
|
return false;
|
|
365
|
-
if (!(this.
|
|
367
|
+
if (!(this.hb7_1 === other.hb7_1))
|
|
366
368
|
return false;
|
|
367
|
-
if (!(this.
|
|
369
|
+
if (!(this.ib7_1 === other.ib7_1))
|
|
368
370
|
return false;
|
|
369
|
-
if (!(this.
|
|
371
|
+
if (!(this.jb7_1 === other.jb7_1))
|
|
370
372
|
return false;
|
|
371
|
-
if (!equals(this.
|
|
373
|
+
if (!equals(this.kb7_1, other.kb7_1))
|
|
372
374
|
return false;
|
|
373
|
-
if (!(this.
|
|
375
|
+
if (!(this.lb7_1 == other.lb7_1))
|
|
374
376
|
return false;
|
|
375
|
-
if (!(this.
|
|
377
|
+
if (!(this.mb7_1 == other.mb7_1))
|
|
376
378
|
return false;
|
|
377
|
-
if (!equals(this.
|
|
379
|
+
if (!equals(this.nb7_1, other.nb7_1))
|
|
378
380
|
return false;
|
|
379
|
-
if (!this.
|
|
381
|
+
if (!this.ob7_1.equals(other.ob7_1))
|
|
380
382
|
return false;
|
|
381
|
-
if (!this.
|
|
383
|
+
if (!this.pb7_1.equals(other.pb7_1))
|
|
382
384
|
return false;
|
|
383
|
-
if (!(this.
|
|
385
|
+
if (!(this.qb7_1 === other.qb7_1))
|
|
386
|
+
return false;
|
|
387
|
+
if (!this.rb7_1.equals(other.rb7_1))
|
|
384
388
|
return false;
|
|
385
389
|
return true;
|
|
386
390
|
};
|
|
387
391
|
function SuitSelectionEvent(playerId, suit, circleNumber) {
|
|
388
|
-
this.
|
|
389
|
-
this.
|
|
390
|
-
this.
|
|
392
|
+
this.sb7_1 = playerId;
|
|
393
|
+
this.tb7_1 = suit;
|
|
394
|
+
this.ub7_1 = circleNumber;
|
|
391
395
|
}
|
|
392
396
|
protoOf(SuitSelectionEvent).toString = function () {
|
|
393
|
-
return 'SuitSelectionEvent(playerId=' + this.
|
|
397
|
+
return 'SuitSelectionEvent(playerId=' + this.sb7_1 + ', suit=' + toString(this.tb7_1) + ', circleNumber=' + this.ub7_1 + ')';
|
|
394
398
|
};
|
|
395
399
|
protoOf(SuitSelectionEvent).hashCode = function () {
|
|
396
|
-
var result = getStringHashCode(this.
|
|
397
|
-
result = imul(result, 31) + (this.
|
|
398
|
-
result = imul(result, 31) + this.
|
|
400
|
+
var result = getStringHashCode(this.sb7_1);
|
|
401
|
+
result = imul(result, 31) + (this.tb7_1 == null ? 0 : this.tb7_1.hashCode()) | 0;
|
|
402
|
+
result = imul(result, 31) + this.ub7_1 | 0;
|
|
399
403
|
return result;
|
|
400
404
|
};
|
|
401
405
|
protoOf(SuitSelectionEvent).equals = function (other) {
|
|
@@ -403,11 +407,11 @@
|
|
|
403
407
|
return true;
|
|
404
408
|
if (!(other instanceof SuitSelectionEvent))
|
|
405
409
|
return false;
|
|
406
|
-
if (!(this.
|
|
410
|
+
if (!(this.sb7_1 === other.sb7_1))
|
|
407
411
|
return false;
|
|
408
|
-
if (!equals(this.
|
|
412
|
+
if (!equals(this.tb7_1, other.tb7_1))
|
|
409
413
|
return false;
|
|
410
|
-
if (!(this.
|
|
414
|
+
if (!(this.ub7_1 === other.ub7_1))
|
|
411
415
|
return false;
|
|
412
416
|
return true;
|
|
413
417
|
};
|
|
@@ -415,36 +419,36 @@
|
|
|
415
419
|
var _iterator__ex2g4s = cards.t();
|
|
416
420
|
while (_iterator__ex2g4s.u()) {
|
|
417
421
|
var card = _iterator__ex2g4s.v();
|
|
418
|
-
vec[offset + CardLocationIndex_instance.
|
|
422
|
+
vec[offset + CardLocationIndex_instance.yb7(card) | 0] = 1.0;
|
|
419
423
|
}
|
|
420
424
|
return offset + 32 | 0;
|
|
421
425
|
}
|
|
422
426
|
function encodeCardOneHot($this, vec, offset, card) {
|
|
423
427
|
if (!(card == null)) {
|
|
424
|
-
vec[offset + CardLocationIndex_instance.
|
|
428
|
+
vec[offset + CardLocationIndex_instance.yb7(card) | 0] = 1.0;
|
|
425
429
|
}
|
|
426
430
|
return offset + 32 | 0;
|
|
427
431
|
}
|
|
428
432
|
function Companion() {
|
|
429
|
-
this.
|
|
430
|
-
this.
|
|
431
|
-
this.
|
|
433
|
+
this.zb7_1 = 32;
|
|
434
|
+
this.ab8_1 = 162.0;
|
|
435
|
+
this.bb8_1 = 8.0;
|
|
432
436
|
}
|
|
433
437
|
var Companion_instance_1;
|
|
434
438
|
function Companion_getInstance() {
|
|
435
439
|
return Companion_instance_1;
|
|
436
440
|
}
|
|
437
441
|
function sam$kotlin_Comparator$0(function_0) {
|
|
438
|
-
this.
|
|
442
|
+
this.cb8_1 = function_0;
|
|
439
443
|
}
|
|
440
444
|
protoOf(sam$kotlin_Comparator$0).hd = function (a, b) {
|
|
441
|
-
return this.
|
|
445
|
+
return this.cb8_1(a, b);
|
|
442
446
|
};
|
|
443
447
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
444
448
|
return this.hd(a, b);
|
|
445
449
|
};
|
|
446
450
|
protoOf(sam$kotlin_Comparator$0).s3 = function () {
|
|
447
|
-
return this.
|
|
451
|
+
return this.cb8_1;
|
|
448
452
|
};
|
|
449
453
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
450
454
|
var tmp;
|
|
@@ -466,33 +470,33 @@
|
|
|
466
470
|
};
|
|
467
471
|
function BeliefFeatureEncoder$encode$lambda(a, b) {
|
|
468
472
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
469
|
-
var tmp = a.
|
|
470
|
-
var tmp$ret$1 = b.
|
|
473
|
+
var tmp = a.s8k_1;
|
|
474
|
+
var tmp$ret$1 = b.s8k_1;
|
|
471
475
|
return compareValues(tmp, tmp$ret$1);
|
|
472
476
|
}
|
|
473
477
|
function BeliefFeatureEncoder(playersMode) {
|
|
474
|
-
this.
|
|
475
|
-
this.
|
|
476
|
-
this.
|
|
478
|
+
this.db8_1 = playersMode;
|
|
479
|
+
this.eb8_1 = this.db8_1.count;
|
|
480
|
+
this.fb8_1 = this.eb8_1 - 1 | 0;
|
|
477
481
|
var tmp = this;
|
|
478
482
|
// Inline function 'kotlin.run' call
|
|
479
|
-
tmp.
|
|
483
|
+
tmp.gb8_1 = ((((((((((((((32 + imul(32, this.eb8_1) | 0) + 96 | 0) + 4 | 0) + 32 | 0) + 1 | 0) + imul(this.eb8_1, 4) | 0) + 8 | 0) + 4 | 0) + 4 | 0) + this.fb8_1 | 0) + imul(this.fb8_1, 4) | 0) + 1 | 0) + this.fb8_1 | 0) + 4 | 0) + 1 | 0;
|
|
480
484
|
}
|
|
481
|
-
protoOf(BeliefFeatureEncoder).
|
|
482
|
-
var vec = new Float32Array(this.
|
|
485
|
+
protoOf(BeliefFeatureEncoder).hb8 = function (state) {
|
|
486
|
+
var vec = new Float32Array(this.gb8_1);
|
|
483
487
|
var offset = 0;
|
|
484
|
-
var focalIndex = state.
|
|
485
|
-
var n = state.
|
|
486
|
-
offset = encodeCardSet(this, vec, offset, state.
|
|
488
|
+
var focalIndex = state.vb6_1.o2(state.ub6_1);
|
|
489
|
+
var n = state.vb6_1.g1();
|
|
490
|
+
offset = encodeCardSet(this, vec, offset, state.wb6_1);
|
|
487
491
|
var inductionVariable = 0;
|
|
488
|
-
var last = this.
|
|
492
|
+
var last = this.eb8_1;
|
|
489
493
|
if (inductionVariable < last)
|
|
490
494
|
do {
|
|
491
495
|
var relPos = inductionVariable;
|
|
492
496
|
inductionVariable = inductionVariable + 1 | 0;
|
|
493
497
|
var absIdx = (focalIndex + relPos | 0) % n | 0;
|
|
494
498
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
495
|
-
var this_0 = state.
|
|
499
|
+
var this_0 = state.vb6_1;
|
|
496
500
|
var tmp;
|
|
497
501
|
if (0 <= absIdx ? absIdx < this_0.g1() : false) {
|
|
498
502
|
tmp = this_0.h1(absIdx);
|
|
@@ -501,12 +505,12 @@
|
|
|
501
505
|
}
|
|
502
506
|
var pid = tmp;
|
|
503
507
|
var tmp_0 = offset;
|
|
504
|
-
var tmp0_elvis_lhs = state.
|
|
508
|
+
var tmp0_elvis_lhs = state.xb6_1.v2(pid);
|
|
505
509
|
offset = encodeCardSet(this, vec, tmp_0, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
|
|
506
510
|
}
|
|
507
511
|
while (inductionVariable < last);
|
|
508
512
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
509
|
-
var this_1 = state.
|
|
513
|
+
var this_1 = state.yb6_1;
|
|
510
514
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
511
515
|
var tmp_1 = BeliefFeatureEncoder$encode$lambda;
|
|
512
516
|
var tmp$ret$2 = new sam$kotlin_Comparator$0(tmp_1);
|
|
@@ -517,28 +521,28 @@
|
|
|
517
521
|
var slot = inductionVariable_0;
|
|
518
522
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
519
523
|
var tmp1_safe_receiver = getOrNull(sortedTrick, slot);
|
|
520
|
-
var card = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
524
|
+
var card = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t8k_1;
|
|
521
525
|
offset = encodeCardOneHot(this, vec, offset, card);
|
|
522
526
|
}
|
|
523
527
|
while (inductionVariable_0 <= 2);
|
|
524
|
-
var trump = state.
|
|
528
|
+
var trump = state.zb6_1;
|
|
525
529
|
if (!(trump == null)) {
|
|
526
530
|
vec[offset + trump.a1_1 | 0] = 1.0;
|
|
527
531
|
}
|
|
528
532
|
offset = offset + 4 | 0;
|
|
529
|
-
offset = encodeCardOneHot(this, vec, offset, state.
|
|
533
|
+
offset = encodeCardOneHot(this, vec, offset, state.ab7_1);
|
|
530
534
|
var _unary__edvuaz = offset;
|
|
531
535
|
offset = _unary__edvuaz + 1 | 0;
|
|
532
|
-
vec[_unary__edvuaz] = state.
|
|
536
|
+
vec[_unary__edvuaz] = state.bb7_1 ? 1.0 : 0.0;
|
|
533
537
|
var inductionVariable_1 = 0;
|
|
534
|
-
var last_0 = this.
|
|
538
|
+
var last_0 = this.eb8_1;
|
|
535
539
|
if (inductionVariable_1 < last_0)
|
|
536
540
|
do {
|
|
537
541
|
var relPos_0 = inductionVariable_1;
|
|
538
542
|
inductionVariable_1 = inductionVariable_1 + 1 | 0;
|
|
539
543
|
var absIdx_0 = (focalIndex + relPos_0 | 0) % n | 0;
|
|
540
544
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
541
|
-
var this_2 = state.
|
|
545
|
+
var this_2 = state.vb6_1;
|
|
542
546
|
var tmp_2;
|
|
543
547
|
if (0 <= absIdx_0 ? absIdx_0 < this_2.g1() : false) {
|
|
544
548
|
tmp_2 = this_2.h1(absIdx_0);
|
|
@@ -547,13 +551,13 @@
|
|
|
547
551
|
}
|
|
548
552
|
var pid_0 = tmp_2;
|
|
549
553
|
// Inline function 'kotlin.collections.filter' call
|
|
550
|
-
var tmp0 = state.
|
|
554
|
+
var tmp0 = state.cb7_1;
|
|
551
555
|
// Inline function 'kotlin.collections.filterTo' call
|
|
552
556
|
var destination = ArrayList_init_$Create$();
|
|
553
557
|
var _iterator__ex2g4s = tmp0.t();
|
|
554
558
|
while (_iterator__ex2g4s.u()) {
|
|
555
559
|
var element = _iterator__ex2g4s.v();
|
|
556
|
-
if (element.
|
|
560
|
+
if (element.sb7_1 === pid_0 && !(element.tb7_1 == null)) {
|
|
557
561
|
destination.e1(element);
|
|
558
562
|
}
|
|
559
563
|
}
|
|
@@ -564,7 +568,7 @@
|
|
|
564
568
|
var _iterator__ex2g4s_0 = destination.t();
|
|
565
569
|
while (_iterator__ex2g4s_0.u()) {
|
|
566
570
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
567
|
-
var tmp0_safe_receiver = element_0.
|
|
571
|
+
var tmp0_safe_receiver = element_0.tb7_1;
|
|
568
572
|
if (tmp0_safe_receiver == null)
|
|
569
573
|
null;
|
|
570
574
|
else {
|
|
@@ -585,34 +589,34 @@
|
|
|
585
589
|
while (inductionVariable_2 < 4);
|
|
586
590
|
}
|
|
587
591
|
while (inductionVariable_1 < last_0);
|
|
588
|
-
var trickIdx = coerceIn(state.
|
|
592
|
+
var trickIdx = coerceIn(state.hb7_1, 0, 7);
|
|
589
593
|
vec[offset + trickIdx | 0] = 1.0;
|
|
590
594
|
offset = offset + 8 | 0;
|
|
591
|
-
var posIdx = coerceIn(state.
|
|
595
|
+
var posIdx = coerceIn(state.ib7_1, 0, 3);
|
|
592
596
|
vec[offset + posIdx | 0] = 1.0;
|
|
593
597
|
offset = offset + 4 | 0;
|
|
594
|
-
var winTarget = coerceAtLeast(state.
|
|
598
|
+
var winTarget = coerceAtLeast(state.rb7_1.value, 1.0);
|
|
595
599
|
var _unary__edvuaz_1 = offset;
|
|
596
600
|
offset = _unary__edvuaz_1 + 1 | 0;
|
|
597
|
-
vec[_unary__edvuaz_1] = state.
|
|
601
|
+
vec[_unary__edvuaz_1] = state.db7_1 / winTarget;
|
|
598
602
|
var _unary__edvuaz_2 = offset;
|
|
599
603
|
offset = _unary__edvuaz_2 + 1 | 0;
|
|
600
|
-
vec[_unary__edvuaz_2] = state.
|
|
604
|
+
vec[_unary__edvuaz_2] = state.eb7_1 / winTarget;
|
|
601
605
|
var _unary__edvuaz_3 = offset;
|
|
602
606
|
offset = _unary__edvuaz_3 + 1 | 0;
|
|
603
|
-
vec[_unary__edvuaz_3] = state.
|
|
607
|
+
vec[_unary__edvuaz_3] = state.fb7_1 / 162.0;
|
|
604
608
|
var _unary__edvuaz_4 = offset;
|
|
605
609
|
offset = _unary__edvuaz_4 + 1 | 0;
|
|
606
|
-
vec[_unary__edvuaz_4] = state.
|
|
610
|
+
vec[_unary__edvuaz_4] = state.gb7_1 / 162.0;
|
|
607
611
|
var inductionVariable_3 = 1;
|
|
608
|
-
var last_1 = this.
|
|
612
|
+
var last_1 = this.fb8_1;
|
|
609
613
|
if (inductionVariable_3 <= last_1)
|
|
610
614
|
do {
|
|
611
615
|
var relPos_1 = inductionVariable_3;
|
|
612
616
|
inductionVariable_3 = inductionVariable_3 + 1 | 0;
|
|
613
617
|
var absIdx_1 = (focalIndex + relPos_1 | 0) % n | 0;
|
|
614
618
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
615
|
-
var this_3 = state.
|
|
619
|
+
var this_3 = state.vb6_1;
|
|
616
620
|
var tmp_3;
|
|
617
621
|
if (0 <= absIdx_1 ? absIdx_1 < this_3.g1() : false) {
|
|
618
622
|
tmp_3 = this_3.h1(absIdx_1);
|
|
@@ -620,23 +624,23 @@
|
|
|
620
624
|
tmp_3 = '';
|
|
621
625
|
}
|
|
622
626
|
var pid_1 = tmp_3;
|
|
623
|
-
var tmp2_elvis_lhs = state.
|
|
627
|
+
var tmp2_elvis_lhs = state.xb6_1.v2(pid_1);
|
|
624
628
|
var played = (tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs).g1();
|
|
625
|
-
var remaining = coerceAtLeast_0(state.
|
|
629
|
+
var remaining = coerceAtLeast_0(state.qb7_1 - played | 0, 0);
|
|
626
630
|
var _unary__edvuaz_5 = offset;
|
|
627
631
|
offset = _unary__edvuaz_5 + 1 | 0;
|
|
628
|
-
vec[_unary__edvuaz_5] = remaining / coerceAtLeast(state.
|
|
632
|
+
vec[_unary__edvuaz_5] = remaining / coerceAtLeast(state.qb7_1, 1.0);
|
|
629
633
|
}
|
|
630
634
|
while (!(relPos_1 === last_1));
|
|
631
635
|
var inductionVariable_4 = 1;
|
|
632
|
-
var last_2 = this.
|
|
636
|
+
var last_2 = this.fb8_1;
|
|
633
637
|
if (inductionVariable_4 <= last_2)
|
|
634
638
|
do {
|
|
635
639
|
var relPos_2 = inductionVariable_4;
|
|
636
640
|
inductionVariable_4 = inductionVariable_4 + 1 | 0;
|
|
637
641
|
var absIdx_2 = (focalIndex + relPos_2 | 0) % n | 0;
|
|
638
642
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
639
|
-
var this_4 = state.
|
|
643
|
+
var this_4 = state.vb6_1;
|
|
640
644
|
var tmp_4;
|
|
641
645
|
if (0 <= absIdx_2 ? absIdx_2 < this_4.g1() : false) {
|
|
642
646
|
tmp_4 = this_4.h1(absIdx_2);
|
|
@@ -644,7 +648,7 @@
|
|
|
644
648
|
tmp_4 = '';
|
|
645
649
|
}
|
|
646
650
|
var pid_2 = tmp_4;
|
|
647
|
-
var tmp3_elvis_lhs = state.
|
|
651
|
+
var tmp3_elvis_lhs = state.kb7_1.v2(pid_2);
|
|
648
652
|
var voidsForPlayer = tmp3_elvis_lhs == null ? emptySet() : tmp3_elvis_lhs;
|
|
649
653
|
var inductionVariable_5 = 0;
|
|
650
654
|
if (inductionVariable_5 < 4)
|
|
@@ -660,17 +664,17 @@
|
|
|
660
664
|
while (!(relPos_2 === last_2));
|
|
661
665
|
var _unary__edvuaz_7 = offset;
|
|
662
666
|
offset = _unary__edvuaz_7 + 1 | 0;
|
|
663
|
-
vec[_unary__edvuaz_7] = state.
|
|
664
|
-
var declarerId = state.
|
|
667
|
+
vec[_unary__edvuaz_7] = state.lb7_1 === true ? 1.0 : 0.0;
|
|
668
|
+
var declarerId = state.mb7_1;
|
|
665
669
|
var inductionVariable_6 = 1;
|
|
666
|
-
var last_3 = this.
|
|
670
|
+
var last_3 = this.fb8_1;
|
|
667
671
|
if (inductionVariable_6 <= last_3)
|
|
668
672
|
do {
|
|
669
673
|
var relPos_3 = inductionVariable_6;
|
|
670
674
|
inductionVariable_6 = inductionVariable_6 + 1 | 0;
|
|
671
675
|
var absIdx_3 = (focalIndex + relPos_3 | 0) % n | 0;
|
|
672
676
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
673
|
-
var this_5 = state.
|
|
677
|
+
var this_5 = state.vb6_1;
|
|
674
678
|
var tmp_5;
|
|
675
679
|
if (0 <= absIdx_3 ? absIdx_3 < this_5.g1() : false) {
|
|
676
680
|
tmp_5 = this_5.h1(absIdx_3);
|
|
@@ -685,7 +689,7 @@
|
|
|
685
689
|
while (!(relPos_3 === last_3));
|
|
686
690
|
var suitCounts = new Int32Array(4);
|
|
687
691
|
// Inline function 'kotlin.collections.iterator' call
|
|
688
|
-
var _iterator__ex2g4s_1 = state.
|
|
692
|
+
var _iterator__ex2g4s_1 = state.xb6_1.m1().t();
|
|
689
693
|
while (_iterator__ex2g4s_1.u()) {
|
|
690
694
|
// Inline function 'kotlin.collections.component2' call
|
|
691
695
|
var cards = _iterator__ex2g4s_1.v().o1();
|
|
@@ -696,10 +700,10 @@
|
|
|
696
700
|
suitCounts[_index_0__fvwizt] = suitCounts[_index_0__fvwizt] + 1 | 0;
|
|
697
701
|
}
|
|
698
702
|
}
|
|
699
|
-
var _iterator__ex2g4s_3 = state.
|
|
703
|
+
var _iterator__ex2g4s_3 = state.yb6_1.t();
|
|
700
704
|
while (_iterator__ex2g4s_3.u()) {
|
|
701
705
|
var cot = _iterator__ex2g4s_3.v();
|
|
702
|
-
var _index_0__fvwizt_0 = cot.
|
|
706
|
+
var _index_0__fvwizt_0 = cot.t8k_1.x6l().a1_1;
|
|
703
707
|
suitCounts[_index_0__fvwizt_0] = suitCounts[_index_0__fvwizt_0] + 1 | 0;
|
|
704
708
|
}
|
|
705
709
|
var inductionVariable_7 = 0;
|
|
@@ -714,10 +718,10 @@
|
|
|
714
718
|
while (inductionVariable_7 < 4);
|
|
715
719
|
var _unary__edvuaz_10 = offset;
|
|
716
720
|
offset = _unary__edvuaz_10 + 1 | 0;
|
|
717
|
-
vec[_unary__edvuaz_10] = state.
|
|
721
|
+
vec[_unary__edvuaz_10] = state.jb7_1 ? 1.0 : 0.0;
|
|
718
722
|
// Inline function 'kotlin.check' call
|
|
719
|
-
if (!(offset === this.
|
|
720
|
-
var message = 'BeliefFeatureEncoder: wrote ' + offset + ' floats but expected ' + this.
|
|
723
|
+
if (!(offset === this.gb8_1)) {
|
|
724
|
+
var message = 'BeliefFeatureEncoder: wrote ' + offset + ' floats but expected ' + this.gb8_1;
|
|
721
725
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
722
726
|
}
|
|
723
727
|
return vec;
|
|
@@ -728,38 +732,38 @@
|
|
|
728
732
|
return 1.0 / (1.0 + Math.exp(x_0));
|
|
729
733
|
}
|
|
730
734
|
function CardBeliefNetwork(engine, encoder, playersMode) {
|
|
731
|
-
this.
|
|
732
|
-
this.
|
|
733
|
-
this.
|
|
734
|
-
this.
|
|
735
|
-
this.
|
|
736
|
-
}
|
|
737
|
-
protoOf(CardBeliefNetwork).
|
|
738
|
-
this.
|
|
739
|
-
this.
|
|
735
|
+
this.ib8_1 = engine;
|
|
736
|
+
this.jb8_1 = encoder;
|
|
737
|
+
this.kb8_1 = playersMode;
|
|
738
|
+
this.lb8_1 = CardLocationIndex_instance.nb8(this.kb8_1);
|
|
739
|
+
this.mb8_1 = false;
|
|
740
|
+
}
|
|
741
|
+
protoOf(CardBeliefNetwork).ob8 = function (modelBytes) {
|
|
742
|
+
this.ib8_1.ob8(modelBytes);
|
|
743
|
+
this.mb8_1 = true;
|
|
740
744
|
};
|
|
741
|
-
protoOf(CardBeliefNetwork).
|
|
745
|
+
protoOf(CardBeliefNetwork).pb8 = function (state) {
|
|
742
746
|
var knownCards = booleanArray(32);
|
|
743
|
-
var _iterator__ex2g4s = state.
|
|
747
|
+
var _iterator__ex2g4s = state.wb6_1.t();
|
|
744
748
|
while (_iterator__ex2g4s.u()) {
|
|
745
749
|
var card = _iterator__ex2g4s.v();
|
|
746
|
-
knownCards[CardLocationIndex_instance.
|
|
750
|
+
knownCards[CardLocationIndex_instance.yb7(card)] = true;
|
|
747
751
|
}
|
|
748
752
|
// Inline function 'kotlin.collections.iterator' call
|
|
749
|
-
var _iterator__ex2g4s_0 = state.
|
|
753
|
+
var _iterator__ex2g4s_0 = state.xb6_1.m1().t();
|
|
750
754
|
while (_iterator__ex2g4s_0.u()) {
|
|
751
755
|
// Inline function 'kotlin.collections.component2' call
|
|
752
756
|
var cards = _iterator__ex2g4s_0.v().o1();
|
|
753
757
|
var _iterator__ex2g4s_1 = cards.t();
|
|
754
758
|
while (_iterator__ex2g4s_1.u()) {
|
|
755
759
|
var card_0 = _iterator__ex2g4s_1.v();
|
|
756
|
-
knownCards[CardLocationIndex_instance.
|
|
760
|
+
knownCards[CardLocationIndex_instance.yb7(card_0)] = true;
|
|
757
761
|
}
|
|
758
762
|
}
|
|
759
|
-
var _iterator__ex2g4s_2 = state.
|
|
763
|
+
var _iterator__ex2g4s_2 = state.yb6_1.t();
|
|
760
764
|
while (_iterator__ex2g4s_2.u()) {
|
|
761
765
|
var cot = _iterator__ex2g4s_2.v();
|
|
762
|
-
knownCards[CardLocationIndex_instance.
|
|
766
|
+
knownCards[CardLocationIndex_instance.yb7(cot.t8k_1)] = true;
|
|
763
767
|
}
|
|
764
768
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
765
769
|
var hiddenIndices = ArrayList_init_$Create$();
|
|
@@ -773,8 +777,8 @@
|
|
|
773
777
|
}
|
|
774
778
|
}
|
|
775
779
|
while (inductionVariable < 32);
|
|
776
|
-
if (!this.
|
|
777
|
-
var uniform = 1.0 / this.
|
|
780
|
+
if (!this.mb8_1) {
|
|
781
|
+
var uniform = 1.0 / this.lb8_1;
|
|
778
782
|
var tmp = 0;
|
|
779
783
|
var tmp_0 = hiddenIndices.g1();
|
|
780
784
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
@@ -782,7 +786,7 @@
|
|
|
782
786
|
while (tmp < tmp_0) {
|
|
783
787
|
var tmp_2 = tmp;
|
|
784
788
|
var tmp_3 = 0;
|
|
785
|
-
var tmp_4 = this.
|
|
789
|
+
var tmp_4 = this.lb8_1;
|
|
786
790
|
var tmp_5 = new Float32Array(tmp_4);
|
|
787
791
|
while (tmp_3 < tmp_4) {
|
|
788
792
|
tmp_5[tmp_3] = uniform;
|
|
@@ -794,8 +798,8 @@
|
|
|
794
798
|
var matrix = tmp_1;
|
|
795
799
|
return new CardBeliefResult(matrix, toIntArray(hiddenIndices));
|
|
796
800
|
}
|
|
797
|
-
var features = this.
|
|
798
|
-
var rawOutput = this.
|
|
801
|
+
var features = this.jb8_1.hb8(state);
|
|
802
|
+
var rawOutput = this.ib8_1.qb8(features);
|
|
799
803
|
var tmp_6 = 0;
|
|
800
804
|
var tmp_7 = hiddenIndices.g1();
|
|
801
805
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
@@ -804,7 +808,7 @@
|
|
|
804
808
|
var tmp_9 = tmp_6;
|
|
805
809
|
var cardIdx = hiddenIndices.h1(tmp_9);
|
|
806
810
|
var tmp_10;
|
|
807
|
-
if (this.
|
|
811
|
+
if (this.lb8_1 === 1) {
|
|
808
812
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
809
813
|
var tmp_11;
|
|
810
814
|
if (0 <= cardIdx ? cardIdx <= (rawOutput.length - 1 | 0) : false) {
|
|
@@ -816,9 +820,9 @@
|
|
|
816
820
|
// Inline function 'kotlin.floatArrayOf' call
|
|
817
821
|
tmp_10 = new Float32Array([sigmoid(this, logit)]);
|
|
818
822
|
} else {
|
|
819
|
-
var rowStart = imul(cardIdx, this.
|
|
823
|
+
var rowStart = imul(cardIdx, this.lb8_1);
|
|
820
824
|
var tmp_12 = 0;
|
|
821
|
-
var tmp_13 = this.
|
|
825
|
+
var tmp_13 = this.lb8_1;
|
|
822
826
|
var tmp_14 = new Float32Array(tmp_13);
|
|
823
827
|
while (tmp_12 < tmp_13) {
|
|
824
828
|
var tmp_15 = tmp_12;
|
|
@@ -834,7 +838,7 @@
|
|
|
834
838
|
tmp_12 = tmp_12 + 1 | 0;
|
|
835
839
|
}
|
|
836
840
|
var logits = tmp_14;
|
|
837
|
-
tmp_10 = Companion_instance_4.
|
|
841
|
+
tmp_10 = Companion_instance_4.sb8(logits);
|
|
838
842
|
}
|
|
839
843
|
tmp_8[tmp_9] = tmp_10;
|
|
840
844
|
tmp_6 = tmp_6 + 1 | 0;
|
|
@@ -843,8 +847,8 @@
|
|
|
843
847
|
return new CardBeliefResult(matrix_0, toIntArray(hiddenIndices));
|
|
844
848
|
};
|
|
845
849
|
function CardBeliefResult(beliefMatrix, hiddenCardIndices) {
|
|
846
|
-
this.
|
|
847
|
-
this.
|
|
850
|
+
this.tb8_1 = beliefMatrix;
|
|
851
|
+
this.ub8_1 = hiddenCardIndices;
|
|
848
852
|
}
|
|
849
853
|
protoOf(CardBeliefResult).equals = function (other) {
|
|
850
854
|
if (this === other)
|
|
@@ -854,8 +858,8 @@
|
|
|
854
858
|
if (!(other instanceof CardBeliefResult))
|
|
855
859
|
THROW_CCE();
|
|
856
860
|
var tmp;
|
|
857
|
-
if (contentEquals_0(this.
|
|
858
|
-
var tmp0 = get_indices(this.
|
|
861
|
+
if (contentEquals_0(this.ub8_1, other.ub8_1) && this.tb8_1.length === other.tb8_1.length) {
|
|
862
|
+
var tmp0 = get_indices(this.tb8_1);
|
|
859
863
|
var tmp$ret$0;
|
|
860
864
|
$l$block_0: {
|
|
861
865
|
// Inline function 'kotlin.collections.all' call
|
|
@@ -876,7 +880,7 @@
|
|
|
876
880
|
var element = inductionVariable;
|
|
877
881
|
inductionVariable = inductionVariable + 1 | 0;
|
|
878
882
|
var it = element;
|
|
879
|
-
if (!contentEquals(this.
|
|
883
|
+
if (!contentEquals(this.tb8_1[it], other.tb8_1[it])) {
|
|
880
884
|
tmp$ret$0 = false;
|
|
881
885
|
break $l$block_0;
|
|
882
886
|
}
|
|
@@ -891,22 +895,22 @@
|
|
|
891
895
|
return tmp;
|
|
892
896
|
};
|
|
893
897
|
protoOf(CardBeliefResult).hashCode = function () {
|
|
894
|
-
var result = contentHashCode(this.
|
|
895
|
-
result = imul(31, result) + contentDeepHashCode(this.
|
|
898
|
+
var result = contentHashCode(this.ub8_1);
|
|
899
|
+
result = imul(31, result) + contentDeepHashCode(this.tb8_1) | 0;
|
|
896
900
|
return result;
|
|
897
901
|
};
|
|
898
902
|
protoOf(CardBeliefResult).toString = function () {
|
|
899
|
-
return 'CardBeliefResult(beliefMatrix=' + toString_0(this.
|
|
903
|
+
return 'CardBeliefResult(beliefMatrix=' + toString_0(this.tb8_1) + ', hiddenCardIndices=' + toString_0(this.ub8_1) + ')';
|
|
900
904
|
};
|
|
901
905
|
function CardLocationIndex() {
|
|
902
|
-
this.
|
|
903
|
-
this.
|
|
904
|
-
this.
|
|
906
|
+
this.vb7_1 = 32;
|
|
907
|
+
this.wb7_1 = 4;
|
|
908
|
+
this.xb7_1 = 8;
|
|
905
909
|
}
|
|
906
|
-
protoOf(CardLocationIndex).
|
|
910
|
+
protoOf(CardLocationIndex).yb7 = function (card) {
|
|
907
911
|
return imul(card.x6l().a1_1, 8) + card.m().a1_1 | 0;
|
|
908
912
|
};
|
|
909
|
-
protoOf(CardLocationIndex).
|
|
913
|
+
protoOf(CardLocationIndex).nb8 = function (mode) {
|
|
910
914
|
return mode.count - 1 | 0;
|
|
911
915
|
};
|
|
912
916
|
var CardLocationIndex_instance;
|
|
@@ -914,16 +918,16 @@
|
|
|
914
918
|
return CardLocationIndex_instance;
|
|
915
919
|
}
|
|
916
920
|
function sam$kotlin_Comparator$0_0(function_0) {
|
|
917
|
-
this.
|
|
921
|
+
this.vb8_1 = function_0;
|
|
918
922
|
}
|
|
919
923
|
protoOf(sam$kotlin_Comparator$0_0).hd = function (a, b) {
|
|
920
|
-
return this.
|
|
924
|
+
return this.vb8_1(a, b);
|
|
921
925
|
};
|
|
922
926
|
protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
|
|
923
927
|
return this.hd(a, b);
|
|
924
928
|
};
|
|
925
929
|
protoOf(sam$kotlin_Comparator$0_0).s3 = function () {
|
|
926
|
-
return this.
|
|
930
|
+
return this.vb8_1;
|
|
927
931
|
};
|
|
928
932
|
protoOf(sam$kotlin_Comparator$0_0).equals = function (other) {
|
|
929
933
|
var tmp;
|
|
@@ -945,13 +949,13 @@
|
|
|
945
949
|
};
|
|
946
950
|
function SuitVoidDetector$detectVoids$lambda(a, b) {
|
|
947
951
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
948
|
-
var tmp = a.
|
|
949
|
-
var tmp$ret$1 = b.
|
|
952
|
+
var tmp = a.s8k_1;
|
|
953
|
+
var tmp$ret$1 = b.s8k_1;
|
|
950
954
|
return compareValues(tmp, tmp$ret$1);
|
|
951
955
|
}
|
|
952
956
|
function SuitVoidDetector() {
|
|
953
957
|
}
|
|
954
|
-
protoOf(SuitVoidDetector).
|
|
958
|
+
protoOf(SuitVoidDetector).wb8 = function (tricks) {
|
|
955
959
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
956
960
|
var voids = LinkedHashMap_init_$Create$();
|
|
957
961
|
var _iterator__ex2g4s = tricks.t();
|
|
@@ -964,13 +968,13 @@
|
|
|
964
968
|
var tmp = SuitVoidDetector$detectVoids$lambda;
|
|
965
969
|
var tmp$ret$1 = new sam$kotlin_Comparator$0_0(tmp);
|
|
966
970
|
var sorted = sortedWith(trick, tmp$ret$1);
|
|
967
|
-
var leadSuit = first(sorted).
|
|
971
|
+
var leadSuit = first(sorted).t8k_1.x6l();
|
|
968
972
|
var _iterator__ex2g4s_0 = sorted.t();
|
|
969
973
|
while (_iterator__ex2g4s_0.u()) {
|
|
970
974
|
var cardOnTable = _iterator__ex2g4s_0.v();
|
|
971
|
-
if (!cardOnTable.
|
|
975
|
+
if (!cardOnTable.t8k_1.x6l().equals(leadSuit)) {
|
|
972
976
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
973
|
-
var key = cardOnTable.
|
|
977
|
+
var key = cardOnTable.r8k_1;
|
|
974
978
|
var value = voids.v2(key);
|
|
975
979
|
var tmp_0;
|
|
976
980
|
if (value == null) {
|
|
@@ -992,17 +996,17 @@
|
|
|
992
996
|
return SuitVoidDetector_instance;
|
|
993
997
|
}
|
|
994
998
|
function BotModelConfig(playersMode, rulesSetType, modelBytes) {
|
|
995
|
-
this.
|
|
996
|
-
this.
|
|
997
|
-
this.
|
|
999
|
+
this.xb8_1 = playersMode;
|
|
1000
|
+
this.yb8_1 = rulesSetType;
|
|
1001
|
+
this.zb8_1 = modelBytes;
|
|
998
1002
|
}
|
|
999
1003
|
protoOf(BotModelConfig).toString = function () {
|
|
1000
|
-
return 'BotModelConfig(playersMode=' + this.
|
|
1004
|
+
return 'BotModelConfig(playersMode=' + this.xb8_1.toString() + ', rulesSetType=' + this.yb8_1.toString() + ', modelBytes=' + toString_0(this.zb8_1) + ')';
|
|
1001
1005
|
};
|
|
1002
1006
|
protoOf(BotModelConfig).hashCode = function () {
|
|
1003
|
-
var result = this.
|
|
1004
|
-
result = imul(result, 31) + this.
|
|
1005
|
-
result = imul(result, 31) + hashCode(this.
|
|
1007
|
+
var result = this.xb8_1.hashCode();
|
|
1008
|
+
result = imul(result, 31) + this.yb8_1.hashCode() | 0;
|
|
1009
|
+
result = imul(result, 31) + hashCode(this.zb8_1) | 0;
|
|
1006
1010
|
return result;
|
|
1007
1011
|
};
|
|
1008
1012
|
protoOf(BotModelConfig).equals = function (other) {
|
|
@@ -1010,43 +1014,43 @@
|
|
|
1010
1014
|
return true;
|
|
1011
1015
|
if (!(other instanceof BotModelConfig))
|
|
1012
1016
|
return false;
|
|
1013
|
-
if (!this.
|
|
1017
|
+
if (!this.xb8_1.equals(other.xb8_1))
|
|
1014
1018
|
return false;
|
|
1015
|
-
if (!this.
|
|
1019
|
+
if (!this.yb8_1.equals(other.yb8_1))
|
|
1016
1020
|
return false;
|
|
1017
|
-
if (!equals(this.
|
|
1021
|
+
if (!equals(this.zb8_1, other.zb8_1))
|
|
1018
1022
|
return false;
|
|
1019
1023
|
return true;
|
|
1020
1024
|
};
|
|
1021
1025
|
function BotModelRegistry() {
|
|
1022
1026
|
var tmp = this;
|
|
1023
1027
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1024
|
-
tmp.
|
|
1028
|
+
tmp.ab9_1 = LinkedHashMap_init_$Create$();
|
|
1025
1029
|
}
|
|
1026
|
-
protoOf(BotModelRegistry).
|
|
1027
|
-
var tmp0 = this.
|
|
1028
|
-
var tmp2 = new BotModelKey(config.
|
|
1030
|
+
protoOf(BotModelRegistry).bb9 = function (config) {
|
|
1031
|
+
var tmp0 = this.ab9_1;
|
|
1032
|
+
var tmp2 = new BotModelKey(config.xb8_1, config.yb8_1);
|
|
1029
1033
|
// Inline function 'kotlin.collections.set' call
|
|
1030
|
-
var value = config.
|
|
1034
|
+
var value = config.zb8_1;
|
|
1031
1035
|
tmp0.g3(tmp2, value);
|
|
1032
1036
|
};
|
|
1033
|
-
protoOf(BotModelRegistry).
|
|
1034
|
-
return this.
|
|
1037
|
+
protoOf(BotModelRegistry).cb9 = function (playersMode, rulesSetType) {
|
|
1038
|
+
return this.ab9_1.v2(new BotModelKey(playersMode, rulesSetType));
|
|
1035
1039
|
};
|
|
1036
|
-
protoOf(BotModelRegistry).
|
|
1040
|
+
protoOf(BotModelRegistry).db9 = function () {
|
|
1037
1041
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1038
|
-
return !this.
|
|
1042
|
+
return !this.ab9_1.r();
|
|
1039
1043
|
};
|
|
1040
1044
|
function BotModelKey(playersMode, rulesSetType) {
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1045
|
+
this.eb9_1 = playersMode;
|
|
1046
|
+
this.fb9_1 = rulesSetType;
|
|
1043
1047
|
}
|
|
1044
1048
|
protoOf(BotModelKey).toString = function () {
|
|
1045
|
-
return 'BotModelKey(playersMode=' + this.
|
|
1049
|
+
return 'BotModelKey(playersMode=' + this.eb9_1.toString() + ', rulesSetType=' + this.fb9_1.toString() + ')';
|
|
1046
1050
|
};
|
|
1047
1051
|
protoOf(BotModelKey).hashCode = function () {
|
|
1048
|
-
var result = this.
|
|
1049
|
-
result = imul(result, 31) + this.
|
|
1052
|
+
var result = this.eb9_1.hashCode();
|
|
1053
|
+
result = imul(result, 31) + this.fb9_1.hashCode() | 0;
|
|
1050
1054
|
return result;
|
|
1051
1055
|
};
|
|
1052
1056
|
protoOf(BotModelKey).equals = function (other) {
|
|
@@ -1054,9 +1058,9 @@
|
|
|
1054
1058
|
return true;
|
|
1055
1059
|
if (!(other instanceof BotModelKey))
|
|
1056
1060
|
return false;
|
|
1057
|
-
if (!this.
|
|
1061
|
+
if (!this.eb9_1.equals(other.eb9_1))
|
|
1058
1062
|
return false;
|
|
1059
|
-
if (!this.
|
|
1063
|
+
if (!this.fb9_1.equals(other.fb9_1))
|
|
1060
1064
|
return false;
|
|
1061
1065
|
return true;
|
|
1062
1066
|
};
|
|
@@ -1089,13 +1093,13 @@
|
|
|
1089
1093
|
while (_iterator__ex2g4s_1.u()) {
|
|
1090
1094
|
var element = _iterator__ex2g4s_1.v();
|
|
1091
1095
|
// Inline function 'kotlin.collections.filter' call
|
|
1092
|
-
var tmp0_0 = element.
|
|
1096
|
+
var tmp0_0 = element.y92_1;
|
|
1093
1097
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1094
1098
|
var destination_1 = ArrayList_init_$Create$();
|
|
1095
1099
|
var _iterator__ex2g4s_2 = tmp0_0.t();
|
|
1096
1100
|
while (_iterator__ex2g4s_2.u()) {
|
|
1097
1101
|
var element_0 = _iterator__ex2g4s_2.v();
|
|
1098
|
-
if (element_0.
|
|
1102
|
+
if (element_0.r8k_1 === p) {
|
|
1099
1103
|
destination_1.e1(element_0);
|
|
1100
1104
|
}
|
|
1101
1105
|
}
|
|
@@ -1105,7 +1109,7 @@
|
|
|
1105
1109
|
var _iterator__ex2g4s_3 = destination_1.t();
|
|
1106
1110
|
while (_iterator__ex2g4s_3.u()) {
|
|
1107
1111
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1108
|
-
var tmp$ret$7 = item_0.
|
|
1112
|
+
var tmp$ret$7 = item_0.t8k_1;
|
|
1109
1113
|
destination_2.e1(tmp$ret$7);
|
|
1110
1114
|
}
|
|
1111
1115
|
var list = destination_2;
|
|
@@ -1118,10 +1122,10 @@
|
|
|
1118
1122
|
var opponentRoundPoints;
|
|
1119
1123
|
if (playersMode.isTeamGame && players.g1() === 4) {
|
|
1120
1124
|
var partnerIndex = (focalIndex + 2 | 0) % 4 | 0;
|
|
1121
|
-
ownRoundPoints = table.players.h1(focalIndex).
|
|
1122
|
-
opponentRoundPoints = table.players.h1((focalIndex + 1 | 0) % 4 | 0).
|
|
1125
|
+
ownRoundPoints = table.players.h1(focalIndex).n7z_1.e86_1 + table.players.h1(partnerIndex).n7z_1.e86_1 | 0;
|
|
1126
|
+
opponentRoundPoints = table.players.h1((focalIndex + 1 | 0) % 4 | 0).n7z_1.e86_1 + table.players.h1((focalIndex + 3 | 0) % 4 | 0).n7z_1.e86_1 | 0;
|
|
1123
1127
|
} else {
|
|
1124
|
-
ownRoundPoints = table.players.h1(focalIndex).
|
|
1128
|
+
ownRoundPoints = table.players.h1(focalIndex).n7z_1.e86_1;
|
|
1125
1129
|
// Inline function 'kotlin.collections.filter' call
|
|
1126
1130
|
var tmp0_1 = table.players;
|
|
1127
1131
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1139,7 +1143,7 @@
|
|
|
1139
1143
|
while (_iterator__ex2g4s_5.u()) {
|
|
1140
1144
|
var element_2 = _iterator__ex2g4s_5.v();
|
|
1141
1145
|
var tmp = sum;
|
|
1142
|
-
sum = tmp + element_2.
|
|
1146
|
+
sum = tmp + element_2.n7z_1.e86_1 | 0;
|
|
1143
1147
|
}
|
|
1144
1148
|
opponentRoundPoints = sum;
|
|
1145
1149
|
}
|
|
@@ -1153,7 +1157,7 @@
|
|
|
1153
1157
|
var _iterator__ex2g4s_6 = tmp0_2.t();
|
|
1154
1158
|
while (_iterator__ex2g4s_6.u()) {
|
|
1155
1159
|
var element_3 = _iterator__ex2g4s_6.v();
|
|
1156
|
-
if (element_3.
|
|
1160
|
+
if (element_3.l7z_1.c85_1) {
|
|
1157
1161
|
tmp$ret$20 = element_3;
|
|
1158
1162
|
break $l$block;
|
|
1159
1163
|
}
|
|
@@ -1164,7 +1168,7 @@
|
|
|
1164
1168
|
var trumpDeclarerId = trumpDeclarer == null ? null : trumpDeclarer.playerId;
|
|
1165
1169
|
var tmp_0;
|
|
1166
1170
|
if (!(trumpDeclarerId == null)) {
|
|
1167
|
-
tmp_0 = trumpDeclarer.
|
|
1171
|
+
tmp_0 = trumpDeclarer.l7z_1.k89();
|
|
1168
1172
|
} else {
|
|
1169
1173
|
tmp_0 = null;
|
|
1170
1174
|
}
|
|
@@ -1177,15 +1181,15 @@
|
|
|
1177
1181
|
var _iterator__ex2g4s_7 = this_1.t();
|
|
1178
1182
|
while (_iterator__ex2g4s_7.u()) {
|
|
1179
1183
|
var item_1 = _iterator__ex2g4s_7.v();
|
|
1180
|
-
var tmp$ret$21 = item_1.
|
|
1184
|
+
var tmp$ret$21 = item_1.y92_1;
|
|
1181
1185
|
destination_4.e1(tmp$ret$21);
|
|
1182
1186
|
}
|
|
1183
|
-
var suitVoids = tmp_1.
|
|
1187
|
+
var suitVoids = tmp_1.wb8(destination_4);
|
|
1184
1188
|
var tmp_2;
|
|
1185
1189
|
if (!(trumpDeclarerId == null) && !(table.currentTrump == null)) {
|
|
1186
1190
|
var circleNumber = trumpTakenInFirstCircle === true ? 1 : 2;
|
|
1187
1191
|
tmp_2 = listOf(new SuitSelectionEvent(trumpDeclarerId, table.currentTrump, circleNumber));
|
|
1188
|
-
} else if (player.
|
|
1192
|
+
} else if (player.l7z_1.l89()) {
|
|
1189
1193
|
tmp_2 = listOf(new SuitSelectionEvent(playerId, null, 2));
|
|
1190
1194
|
} else {
|
|
1191
1195
|
tmp_2 = emptyList();
|
|
@@ -1197,13 +1201,13 @@
|
|
|
1197
1201
|
while (_iterator__ex2g4s_8.u()) {
|
|
1198
1202
|
var p_0 = _iterator__ex2g4s_8.v();
|
|
1199
1203
|
// Inline function 'kotlin.collections.filter' call
|
|
1200
|
-
var tmp0_3 = p_0.
|
|
1204
|
+
var tmp0_3 = p_0.n7z_1.f86_1;
|
|
1201
1205
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1202
1206
|
var destination_5 = ArrayList_init_$Create$();
|
|
1203
1207
|
var _iterator__ex2g4s_9 = tmp0_3.t();
|
|
1204
1208
|
while (_iterator__ex2g4s_9.u()) {
|
|
1205
1209
|
var element_4 = _iterator__ex2g4s_9.v();
|
|
1206
|
-
if (element_4.
|
|
1210
|
+
if (element_4.r8a_1.equals(CombinationState_ACCEPTED_getInstance())) {
|
|
1207
1211
|
destination_5.e1(element_4);
|
|
1208
1212
|
}
|
|
1209
1213
|
}
|
|
@@ -1213,7 +1217,7 @@
|
|
|
1213
1217
|
var _iterator__ex2g4s_10 = destination_5.t();
|
|
1214
1218
|
while (_iterator__ex2g4s_10.u()) {
|
|
1215
1219
|
var item_2 = _iterator__ex2g4s_10.v();
|
|
1216
|
-
var tmp$ret$28 = item_2.
|
|
1220
|
+
var tmp$ret$28 = item_2.q8a_1;
|
|
1217
1221
|
destination_6.e1(tmp$ret$28);
|
|
1218
1222
|
}
|
|
1219
1223
|
var combos = destination_6;
|
|
@@ -1229,11 +1233,11 @@
|
|
|
1229
1233
|
if (!table.bribes.r()) {
|
|
1230
1234
|
var focalPlayer = table.players.h1(focalIndex);
|
|
1231
1235
|
var tmp_4;
|
|
1232
|
-
if (focalPlayer.
|
|
1236
|
+
if (focalPlayer.l7z_1.a85_1) {
|
|
1233
1237
|
tmp_4 = true;
|
|
1234
1238
|
} else if (playersMode.isTeamGame && players.g1() === 4) {
|
|
1235
1239
|
var partnerIndex_0 = (focalIndex + 2 | 0) % 4 | 0;
|
|
1236
|
-
tmp_4 = table.players.h1(partnerIndex_0).
|
|
1240
|
+
tmp_4 = table.players.h1(partnerIndex_0).l7z_1.a85_1;
|
|
1237
1241
|
} else {
|
|
1238
1242
|
tmp_4 = false;
|
|
1239
1243
|
}
|
|
@@ -1242,20 +1246,21 @@
|
|
|
1242
1246
|
tmp_3 = false;
|
|
1243
1247
|
}
|
|
1244
1248
|
var ownTeamWonLastTrick = tmp_3;
|
|
1245
|
-
var tmp4_ownCards = player.
|
|
1249
|
+
var tmp4_ownCards = player.k7z_1;
|
|
1246
1250
|
var tmp5_trump = table.currentTrump;
|
|
1247
1251
|
var tmp1_safe_receiver = table.cardDeck;
|
|
1248
|
-
var tmp6_trumpCard = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1252
|
+
var tmp6_trumpCard = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b93_1;
|
|
1249
1253
|
var tmp7_isTrumpDeclarer = trumpDeclarerId === playerId;
|
|
1250
|
-
var tmp_5 = player.
|
|
1254
|
+
var tmp_5 = player.k7z_1.g1();
|
|
1251
1255
|
var tmp2_safe_receiver = playedCards.v2(playerId);
|
|
1252
1256
|
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g1();
|
|
1253
1257
|
var tmp8_handSize = tmp_5 + (tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs) | 0;
|
|
1254
|
-
|
|
1258
|
+
var tmp9_pointsMode = table.config.pointsMode;
|
|
1259
|
+
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, tmp9_pointsMode);
|
|
1255
1260
|
}
|
|
1256
1261
|
function computeLegalActions($this, playerId, table) {
|
|
1257
|
-
var sceneId = table.sceneInfo.
|
|
1258
|
-
var actId = table.sceneInfo.
|
|
1262
|
+
var sceneId = table.sceneInfo.n9g_1;
|
|
1263
|
+
var actId = table.sceneInfo.p9g_1;
|
|
1259
1264
|
var tmp;
|
|
1260
1265
|
if (actId === 'COMBINATION') {
|
|
1261
1266
|
tmp = listOf_0([new AcceptCombinations(true), new AcceptCombinations(false)]);
|
|
@@ -1272,7 +1277,7 @@
|
|
|
1272
1277
|
destination.e1(tmp$ret$0);
|
|
1273
1278
|
}
|
|
1274
1279
|
var suits = destination;
|
|
1275
|
-
var canPass = table.config.rules.playWithoutLiabilities || !player.
|
|
1280
|
+
var canPass = table.config.rules.playWithoutLiabilities || !player.l7z_1.u84_1 || !player.l7z_1.l89();
|
|
1276
1281
|
tmp = canPass ? plus(suits, new SelectSuit(null)) : suits;
|
|
1277
1282
|
} else if (get_isEarnPointScene(sceneId) && actId === 'PLAYER_TURN') {
|
|
1278
1283
|
var player_0 = getPlayer(table.players, playerId);
|
|
@@ -1293,7 +1298,7 @@
|
|
|
1293
1298
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1294
1299
|
while (_iterator__ex2g4s_0.u()) {
|
|
1295
1300
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1296
|
-
var tmp$ret$4 = new SimCard(item_0.
|
|
1301
|
+
var tmp$ret$4 = new SimCard(item_0.r8k_1, item_0.t8k_1);
|
|
1297
1302
|
destination_0.e1(tmp$ret$4);
|
|
1298
1303
|
}
|
|
1299
1304
|
var trickCards = destination_0;
|
|
@@ -1322,7 +1327,7 @@
|
|
|
1322
1327
|
}
|
|
1323
1328
|
var partnerPid = tmp_2;
|
|
1324
1329
|
// Inline function 'kotlin.collections.map' call
|
|
1325
|
-
var this_2 = TrickSimulator_instance.
|
|
1330
|
+
var this_2 = TrickSimulator_instance.gb9(player_0.k7z_1, trickCards, trump, table.config.rules, table.config.playersMode, playerId, partnerPid);
|
|
1326
1331
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1327
1332
|
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
1328
1333
|
var _iterator__ex2g4s_2 = this_2.t();
|
|
@@ -1334,7 +1339,7 @@
|
|
|
1334
1339
|
tmp_0 = destination_1;
|
|
1335
1340
|
} else {
|
|
1336
1341
|
// Inline function 'kotlin.collections.map' call
|
|
1337
|
-
var this_3 = player_0.
|
|
1342
|
+
var this_3 = player_0.k7z_1;
|
|
1338
1343
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1339
1344
|
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
|
|
1340
1345
|
var _iterator__ex2g4s_3 = this_3.t();
|
|
@@ -1354,25 +1359,25 @@
|
|
|
1354
1359
|
function mapToClientAction($this, action, playerId, table) {
|
|
1355
1360
|
var tmp;
|
|
1356
1361
|
if (action instanceof SelectSuit) {
|
|
1357
|
-
var tmp4_suit = action.
|
|
1358
|
-
var tmp1_$this = $this.
|
|
1362
|
+
var tmp4_suit = action.sb6_1;
|
|
1363
|
+
var tmp1_$this = $this.jb9_1;
|
|
1359
1364
|
var tmp2_player = getPlayer(table.players, playerId);
|
|
1360
1365
|
var tmp3_round = table.gameInfo.round;
|
|
1361
|
-
var tmp5_tag = tmp1_$this.
|
|
1366
|
+
var tmp5_tag = tmp1_$this.gab(tmp3_round, tmp2_player);
|
|
1362
1367
|
tmp = new SuitChoiceFromClientAction(playerId, true, tmp5_tag, tmp4_suit);
|
|
1363
1368
|
} else {
|
|
1364
1369
|
if (action instanceof PlayCard) {
|
|
1365
|
-
var tmp6_card = action.
|
|
1366
|
-
var tmp7_combinations = findCombinationsForCard($this, action.
|
|
1367
|
-
var tmp8_tag = $this.
|
|
1370
|
+
var tmp6_card = action.qb6_1;
|
|
1371
|
+
var tmp7_combinations = findCombinationsForCard($this, action.qb6_1, playerId, table);
|
|
1372
|
+
var tmp8_tag = $this.jb9_1.hab(table.gameInfo.round, VOID, table.cardsOnTable.g1());
|
|
1368
1373
|
tmp = new CardFromClientAction(playerId, true, tmp8_tag, tmp6_card, tmp7_combinations);
|
|
1369
1374
|
} else {
|
|
1370
1375
|
if (action instanceof AcceptCombinations) {
|
|
1371
|
-
var tmp12_isAccepted = action.
|
|
1372
|
-
var tmp9_$this = $this.
|
|
1376
|
+
var tmp12_isAccepted = action.tb6_1;
|
|
1377
|
+
var tmp9_$this = $this.jb9_1;
|
|
1373
1378
|
var tmp10_round = table.gameInfo.round;
|
|
1374
1379
|
var tmp11_sceneInfo = table.sceneInfo;
|
|
1375
|
-
var tmp13_tag = tmp9_$this.
|
|
1380
|
+
var tmp13_tag = tmp9_$this.fab(tmp11_sceneInfo, tmp10_round);
|
|
1376
1381
|
tmp = new CombinationChoiceFromClientAction(playerId, true, tmp13_tag, tmp12_isAccepted);
|
|
1377
1382
|
} else {
|
|
1378
1383
|
noWhenBranchMatchedException();
|
|
@@ -1383,7 +1388,7 @@
|
|
|
1383
1388
|
}
|
|
1384
1389
|
function findCombinationsForCard($this, card, playerId, table) {
|
|
1385
1390
|
var player = getPlayer(table.players, playerId);
|
|
1386
|
-
var stored = player.
|
|
1391
|
+
var stored = player.n7z_1.f86_1;
|
|
1387
1392
|
var firstCardCombos = filterByCombinationState(filterWithFirstCardCombination(stored), [CombinationState_NOT_VERIFIED_getInstance()]);
|
|
1388
1393
|
var trump = table.currentTrump;
|
|
1389
1394
|
var tmp;
|
|
@@ -1433,9 +1438,9 @@
|
|
|
1433
1438
|
return tmp_2;
|
|
1434
1439
|
}
|
|
1435
1440
|
function handleWaitingAct($this, playerId, table) {
|
|
1436
|
-
if (!(table.sceneInfo.
|
|
1441
|
+
if (!(table.sceneInfo.p9g_1 === 'WAITING_ACT'))
|
|
1437
1442
|
return null;
|
|
1438
|
-
var tmp0 = table.sceneInfo.
|
|
1443
|
+
var tmp0 = table.sceneInfo.r9g_1;
|
|
1439
1444
|
var tmp$ret$0;
|
|
1440
1445
|
$l$block: {
|
|
1441
1446
|
// Inline function 'games.jass.logic.data.models.scenes.requireActData' call
|
|
@@ -1446,7 +1451,7 @@
|
|
|
1446
1451
|
throw new MechanicException('Required ' + getKClass(WaitingActData).o() + ', current act is ' + toString(tmp0));
|
|
1447
1452
|
}
|
|
1448
1453
|
var waitingActData = tmp$ret$0;
|
|
1449
|
-
var tmp0_elvis_lhs = waitingActData.
|
|
1454
|
+
var tmp0_elvis_lhs = waitingActData.v8l_1;
|
|
1450
1455
|
var tmp;
|
|
1451
1456
|
if (tmp0_elvis_lhs == null) {
|
|
1452
1457
|
return null;
|
|
@@ -1458,7 +1463,7 @@
|
|
|
1458
1463
|
if (requestPayload instanceof CardDeckRequest) {
|
|
1459
1464
|
// Inline function 'kotlin.collections.List' call
|
|
1460
1465
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1461
|
-
var size = requestPayload.
|
|
1466
|
+
var size = requestPayload.t8l_1;
|
|
1462
1467
|
var list = ArrayList_init_$Create$_0(size);
|
|
1463
1468
|
// Inline function 'kotlin.repeat' call
|
|
1464
1469
|
var inductionVariable = 0;
|
|
@@ -1466,11 +1471,11 @@
|
|
|
1466
1471
|
do {
|
|
1467
1472
|
var index = inductionVariable;
|
|
1468
1473
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1469
|
-
var tmp$ret$1 = Companion_instance.
|
|
1474
|
+
var tmp$ret$1 = Companion_instance.x96($this.ib9_1.aab());
|
|
1470
1475
|
list.e1(tmp$ret$1);
|
|
1471
1476
|
}
|
|
1472
1477
|
while (inductionVariable < size);
|
|
1473
|
-
var tmp3_tag = $this.
|
|
1478
|
+
var tmp3_tag = $this.jb9_1.cab(table.sceneInfo.n9g_1, table.gameInfo.round);
|
|
1474
1479
|
tmp_0 = new RequestedCardDecksFromClientAction(list, playerId, true, tmp3_tag);
|
|
1475
1480
|
} else {
|
|
1476
1481
|
noWhenBranchMatchedException();
|
|
@@ -1497,12 +1502,12 @@
|
|
|
1497
1502
|
var playerIndex = tmp$ret$1;
|
|
1498
1503
|
var partnerIndex = (playerIndex + 2 | 0) % table.players.g1() | 0;
|
|
1499
1504
|
var partnerId = table.players.h1(partnerIndex).playerId;
|
|
1500
|
-
var tmp0_tag = $this.
|
|
1505
|
+
var tmp0_tag = $this.jb9_1.dab(table.gameInfo.round);
|
|
1501
1506
|
return new PartnerSelectedFromClientAction(playerId, true, tmp0_tag, partnerId);
|
|
1502
1507
|
}
|
|
1503
1508
|
function handleCalcPoints($this, playerId, table) {
|
|
1504
|
-
if ($this.
|
|
1505
|
-
var tmp0 = table.sceneInfo.
|
|
1509
|
+
if ($this.kb9_1 === table.gameInfo.gameNumber) {
|
|
1510
|
+
var tmp0 = table.sceneInfo.q9g_1;
|
|
1506
1511
|
var tmp$ret$0;
|
|
1507
1512
|
$l$block: {
|
|
1508
1513
|
// Inline function 'games.jass.logic.data.models.scenes.requireSceneData' call
|
|
@@ -1514,29 +1519,29 @@
|
|
|
1514
1519
|
}
|
|
1515
1520
|
var sceneData = tmp$ret$0;
|
|
1516
1521
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
1517
|
-
var tmp0_elvis_lhs = sceneData.
|
|
1522
|
+
var tmp0_elvis_lhs = sceneData.q8m_1;
|
|
1518
1523
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1519
1524
|
if (!(tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs).r()) {
|
|
1520
1525
|
return new ExitFromClientAction(playerId, true);
|
|
1521
1526
|
}
|
|
1522
1527
|
}
|
|
1523
|
-
return new PlayerReadyFromClientAction(playerId, true, $this.
|
|
1528
|
+
return new PlayerReadyFromClientAction(playerId, true, $this.jb9_1.eab(table.gameInfo.round));
|
|
1524
1529
|
}
|
|
1525
1530
|
function BotPolicyAnswerProvider(policies, dealerInteractor, tagProvider, exitAfterGameNumber) {
|
|
1526
1531
|
exitAfterGameNumber = exitAfterGameNumber === VOID ? null : exitAfterGameNumber;
|
|
1527
|
-
this.
|
|
1528
|
-
this.
|
|
1529
|
-
this.
|
|
1530
|
-
this.
|
|
1532
|
+
this.hb9_1 = policies;
|
|
1533
|
+
this.ib9_1 = dealerInteractor;
|
|
1534
|
+
this.jb9_1 = tagProvider;
|
|
1535
|
+
this.kb9_1 = exitAfterGameNumber;
|
|
1531
1536
|
}
|
|
1532
|
-
protoOf(BotPolicyAnswerProvider).
|
|
1537
|
+
protoOf(BotPolicyAnswerProvider).rar = function (playerId, table) {
|
|
1533
1538
|
var waitingAction = handleWaitingAct(this, playerId, table);
|
|
1534
1539
|
if (!(waitingAction == null))
|
|
1535
1540
|
return waitingAction;
|
|
1536
|
-
if (get_isCalcPointScene(table.sceneInfo.
|
|
1541
|
+
if (get_isCalcPointScene(table.sceneInfo.n9g_1)) {
|
|
1537
1542
|
return handleCalcPoints(this, playerId, table);
|
|
1538
1543
|
}
|
|
1539
|
-
if (get_isChoosePartnerScene(table.sceneInfo.
|
|
1544
|
+
if (get_isChoosePartnerScene(table.sceneInfo.n9g_1)) {
|
|
1540
1545
|
return handleChoosePartner(this, playerId, table);
|
|
1541
1546
|
}
|
|
1542
1547
|
var tmp0 = table.players;
|
|
@@ -1556,32 +1561,32 @@
|
|
|
1556
1561
|
tmp$ret$1 = -1;
|
|
1557
1562
|
}
|
|
1558
1563
|
var seatIndex = tmp$ret$1;
|
|
1559
|
-
var policy = this.
|
|
1564
|
+
var policy = this.hb9_1[seatIndex % this.hb9_1.length | 0];
|
|
1560
1565
|
var state = mapToBotState(this, playerId, table);
|
|
1561
1566
|
var legalActions = computeLegalActions(this, playerId, table);
|
|
1562
|
-
var chosen = policy.
|
|
1567
|
+
var chosen = policy.lb9(state, legalActions);
|
|
1563
1568
|
return mapToClientAction(this, chosen, playerId, table);
|
|
1564
1569
|
};
|
|
1565
1570
|
function Companion_0() {
|
|
1566
|
-
this.
|
|
1571
|
+
this.mb9_1 = 'HeuristicBotAnswerProvider';
|
|
1567
1572
|
}
|
|
1568
1573
|
var Companion_instance_2;
|
|
1569
1574
|
function Companion_getInstance_0() {
|
|
1570
1575
|
return Companion_instance_2;
|
|
1571
1576
|
}
|
|
1572
1577
|
function HeuristicBotAnswerProvider(dealerInteractor, tagProvider, logger) {
|
|
1573
|
-
this.
|
|
1574
|
-
this.
|
|
1575
|
-
this.
|
|
1576
|
-
this.
|
|
1578
|
+
this.nb9_1 = dealerInteractor;
|
|
1579
|
+
this.ob9_1 = tagProvider;
|
|
1580
|
+
this.pb9_1 = logger;
|
|
1581
|
+
this.qb9_1 = null;
|
|
1577
1582
|
}
|
|
1578
|
-
protoOf(HeuristicBotAnswerProvider).
|
|
1579
|
-
var tmp0_elvis_lhs = this.
|
|
1583
|
+
protoOf(HeuristicBotAnswerProvider).rar = function (playerId, table) {
|
|
1584
|
+
var tmp0_elvis_lhs = this.qb9_1;
|
|
1580
1585
|
var tmp;
|
|
1581
1586
|
if (tmp0_elvis_lhs == null) {
|
|
1582
1587
|
// Inline function 'kotlin.run' call
|
|
1583
1588
|
var playersMode = table.config.playersMode;
|
|
1584
|
-
this.
|
|
1589
|
+
this.pb9_1.d('HeuristicBotAnswerProvider', 'Using HeuristicBotPolicy for mode=' + playersMode.z_1 + '.');
|
|
1585
1590
|
var policy = new HeuristicBotPolicy();
|
|
1586
1591
|
var tmp_0 = 0;
|
|
1587
1592
|
var tmp_1 = playersMode.count;
|
|
@@ -1592,37 +1597,37 @@
|
|
|
1592
1597
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1593
1598
|
}
|
|
1594
1599
|
// Inline function 'kotlin.also' call
|
|
1595
|
-
var this_0 = new BotPolicyAnswerProvider(tmp_2, this.
|
|
1596
|
-
this.
|
|
1600
|
+
var this_0 = new BotPolicyAnswerProvider(tmp_2, this.nb9_1, this.ob9_1);
|
|
1601
|
+
this.qb9_1 = this_0;
|
|
1597
1602
|
tmp = this_0;
|
|
1598
1603
|
} else {
|
|
1599
1604
|
tmp = tmp0_elvis_lhs;
|
|
1600
1605
|
}
|
|
1601
1606
|
var answerProvider = tmp;
|
|
1602
|
-
return answerProvider.
|
|
1607
|
+
return answerProvider.rar(playerId, table);
|
|
1603
1608
|
};
|
|
1604
1609
|
function LegacyBotAnswerProvider(playerAnswerInteractor, botConfig) {
|
|
1605
|
-
this.
|
|
1606
|
-
this.
|
|
1610
|
+
this.rb9_1 = playerAnswerInteractor;
|
|
1611
|
+
this.sb9_1 = botConfig;
|
|
1607
1612
|
}
|
|
1608
|
-
protoOf(LegacyBotAnswerProvider).
|
|
1609
|
-
return this.
|
|
1613
|
+
protoOf(LegacyBotAnswerProvider).rar = function (playerId, table) {
|
|
1614
|
+
return this.rb9_1.saa(playerId, table, this.sb9_1);
|
|
1610
1615
|
};
|
|
1611
1616
|
function getOrCreatePolicy($this, playersMode, rulesSetType) {
|
|
1612
1617
|
var cacheKey = rulesSetType.value + '_' + playersMode.z_1;
|
|
1613
1618
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1614
|
-
var this_0 = $this.
|
|
1619
|
+
var this_0 = $this.xb9_1;
|
|
1615
1620
|
var value = this_0.v2(cacheKey);
|
|
1616
1621
|
var tmp;
|
|
1617
1622
|
if (value == null) {
|
|
1618
|
-
var tmp0_safe_receiver = $this.
|
|
1619
|
-
var modelBytes = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1623
|
+
var tmp0_safe_receiver = $this.tb9_1;
|
|
1624
|
+
var modelBytes = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cb9(playersMode, rulesSetType);
|
|
1620
1625
|
var tmp_0;
|
|
1621
1626
|
if (!(modelBytes == null)) {
|
|
1622
|
-
$this.
|
|
1627
|
+
$this.wb9_1.d('PimcBotAnswerProvider', 'Using PIMC+belief for rulesSet=' + rulesSetType.value + ', mode=' + playersMode.z_1 + '.');
|
|
1623
1628
|
tmp_0 = createPimcPolicy($this, modelBytes, playersMode);
|
|
1624
1629
|
} else {
|
|
1625
|
-
$this.
|
|
1630
|
+
$this.wb9_1.d('PimcBotAnswerProvider', 'Using PIMC+uniform for rulesSet=' + rulesSetType.value + ', ' + ('mode=' + playersMode.z_1 + ' (no model \u2014 uniform sampling).'));
|
|
1626
1631
|
tmp_0 = createUniformPimcPolicy($this, playersMode);
|
|
1627
1632
|
}
|
|
1628
1633
|
var answer = tmp_0;
|
|
@@ -1637,7 +1642,7 @@
|
|
|
1637
1642
|
var inferenceEngine = new PureKotlinInferenceEngine();
|
|
1638
1643
|
var encoder = new BeliefFeatureEncoder(playersMode);
|
|
1639
1644
|
var beliefNetwork = new CardBeliefNetwork(inferenceEngine, encoder, playersMode);
|
|
1640
|
-
beliefNetwork.
|
|
1645
|
+
beliefNetwork.ob8(modelBytes);
|
|
1641
1646
|
var rolloutPolicy = new RolloutPolicy();
|
|
1642
1647
|
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, new PimcConfig());
|
|
1643
1648
|
return PimcBotPolicy_init_$Create$(pimcEngine);
|
|
@@ -1647,13 +1652,13 @@
|
|
|
1647
1652
|
var encoder = new BeliefFeatureEncoder(playersMode);
|
|
1648
1653
|
var beliefNetwork = new CardBeliefNetwork(inferenceEngine, encoder, playersMode);
|
|
1649
1654
|
var rolloutPolicy = new RolloutPolicy();
|
|
1650
|
-
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, Companion_getInstance_1().
|
|
1655
|
+
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, Companion_getInstance_1().aba_1);
|
|
1651
1656
|
return PimcBotPolicy_init_$Create$(pimcEngine);
|
|
1652
1657
|
}
|
|
1653
1658
|
function Companion_1() {
|
|
1654
1659
|
Companion_instance_3 = this;
|
|
1655
|
-
this.
|
|
1656
|
-
this.
|
|
1660
|
+
this.zb9_1 = 'PimcBotAnswerProvider';
|
|
1661
|
+
this.aba_1 = new PimcConfig(200);
|
|
1657
1662
|
}
|
|
1658
1663
|
var Companion_instance_3;
|
|
1659
1664
|
function Companion_getInstance_1() {
|
|
@@ -1664,23 +1669,23 @@
|
|
|
1664
1669
|
function PimcBotAnswerProvider(registry, dealerInteractor, tagProvider, logger) {
|
|
1665
1670
|
Companion_getInstance_1();
|
|
1666
1671
|
registry = registry === VOID ? null : registry;
|
|
1667
|
-
this.
|
|
1668
|
-
this.
|
|
1669
|
-
this.
|
|
1670
|
-
this.
|
|
1672
|
+
this.tb9_1 = registry;
|
|
1673
|
+
this.ub9_1 = dealerInteractor;
|
|
1674
|
+
this.vb9_1 = tagProvider;
|
|
1675
|
+
this.wb9_1 = logger;
|
|
1671
1676
|
var tmp = this;
|
|
1672
1677
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1673
|
-
tmp.
|
|
1678
|
+
tmp.xb9_1 = LinkedHashMap_init_$Create$();
|
|
1674
1679
|
var tmp_0 = this;
|
|
1675
1680
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1676
|
-
tmp_0.
|
|
1681
|
+
tmp_0.yb9_1 = LinkedHashMap_init_$Create$();
|
|
1677
1682
|
}
|
|
1678
|
-
protoOf(PimcBotAnswerProvider).
|
|
1683
|
+
protoOf(PimcBotAnswerProvider).rar = function (playerId, table) {
|
|
1679
1684
|
var playersMode = table.config.playersMode;
|
|
1680
1685
|
var rulesSetType = table.config.rulesSetType;
|
|
1681
1686
|
var cacheKey = rulesSetType.value + '_' + playersMode.z_1;
|
|
1682
1687
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1683
|
-
var this_0 = this.
|
|
1688
|
+
var this_0 = this.yb9_1;
|
|
1684
1689
|
var value = this_0.v2(cacheKey);
|
|
1685
1690
|
var tmp;
|
|
1686
1691
|
if (value == null) {
|
|
@@ -1694,14 +1699,14 @@
|
|
|
1694
1699
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1695
1700
|
}
|
|
1696
1701
|
var policies = tmp_2;
|
|
1697
|
-
var answer = new BotPolicyAnswerProvider(policies, this.
|
|
1702
|
+
var answer = new BotPolicyAnswerProvider(policies, this.ub9_1, this.vb9_1);
|
|
1698
1703
|
this_0.g3(cacheKey, answer);
|
|
1699
1704
|
tmp = answer;
|
|
1700
1705
|
} else {
|
|
1701
1706
|
tmp = value;
|
|
1702
1707
|
}
|
|
1703
1708
|
var provider = tmp;
|
|
1704
|
-
return provider.
|
|
1709
|
+
return provider.rar(playerId, table);
|
|
1705
1710
|
};
|
|
1706
1711
|
var Activation_RELU_instance;
|
|
1707
1712
|
var Activation_NONE_instance;
|
|
@@ -1714,43 +1719,43 @@
|
|
|
1714
1719
|
Activation_NONE_instance = new Activation('NONE', 1);
|
|
1715
1720
|
}
|
|
1716
1721
|
function forward($this, layer, input) {
|
|
1717
|
-
var out = new Float32Array(layer.
|
|
1722
|
+
var out = new Float32Array(layer.cba_1);
|
|
1718
1723
|
var inductionVariable = 0;
|
|
1719
|
-
var last = layer.
|
|
1724
|
+
var last = layer.cba_1;
|
|
1720
1725
|
if (inductionVariable < last)
|
|
1721
1726
|
do {
|
|
1722
1727
|
var j = inductionVariable;
|
|
1723
1728
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1724
|
-
var sum = layer.
|
|
1729
|
+
var sum = layer.eba_1[j];
|
|
1725
1730
|
var inductionVariable_0 = 0;
|
|
1726
|
-
var last_0 = layer.
|
|
1731
|
+
var last_0 = layer.bba_1;
|
|
1727
1732
|
if (inductionVariable_0 < last_0)
|
|
1728
1733
|
do {
|
|
1729
1734
|
var i = inductionVariable_0;
|
|
1730
1735
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1731
|
-
sum = sum + input[i] * layer.
|
|
1736
|
+
sum = sum + input[i] * layer.dba_1[imul(i, layer.cba_1) + j | 0];
|
|
1732
1737
|
}
|
|
1733
1738
|
while (inductionVariable_0 < last_0);
|
|
1734
1739
|
out[j] = sum;
|
|
1735
1740
|
}
|
|
1736
1741
|
while (inductionVariable < last);
|
|
1737
|
-
var bn = layer.
|
|
1742
|
+
var bn = layer.fba_1;
|
|
1738
1743
|
if (!(bn == null)) {
|
|
1739
1744
|
var inductionVariable_1 = 0;
|
|
1740
|
-
var last_1 = layer.
|
|
1745
|
+
var last_1 = layer.cba_1;
|
|
1741
1746
|
if (inductionVariable_1 < last_1)
|
|
1742
1747
|
do {
|
|
1743
1748
|
var j_0 = inductionVariable_1;
|
|
1744
1749
|
inductionVariable_1 = inductionVariable_1 + 1 | 0;
|
|
1745
|
-
var normalized = (out[j_0] - bn.
|
|
1746
|
-
out[j_0] = bn.
|
|
1750
|
+
var normalized = (out[j_0] - bn.jba_1[j_0]) / sqrt(bn.kba_1[j_0] + 1.0E-5);
|
|
1751
|
+
out[j_0] = bn.hba_1[j_0] * normalized + bn.iba_1[j_0];
|
|
1747
1752
|
}
|
|
1748
1753
|
while (inductionVariable_1 < last_1);
|
|
1749
1754
|
}
|
|
1750
|
-
switch (layer.
|
|
1755
|
+
switch (layer.gba_1.a1_1) {
|
|
1751
1756
|
case 0:
|
|
1752
1757
|
var inductionVariable_2 = 0;
|
|
1753
|
-
var last_2 = layer.
|
|
1758
|
+
var last_2 = layer.cba_1;
|
|
1754
1759
|
if (inductionVariable_2 < last_2)
|
|
1755
1760
|
do {
|
|
1756
1761
|
var j_1 = inductionVariable_2;
|
|
@@ -1770,23 +1775,23 @@
|
|
|
1770
1775
|
return out;
|
|
1771
1776
|
}
|
|
1772
1777
|
function Layer(inDim, outDim, weight, bias, batchNorm, activation) {
|
|
1773
|
-
this.
|
|
1774
|
-
this.
|
|
1775
|
-
this.
|
|
1776
|
-
this.
|
|
1777
|
-
this.
|
|
1778
|
-
this.
|
|
1778
|
+
this.bba_1 = inDim;
|
|
1779
|
+
this.cba_1 = outDim;
|
|
1780
|
+
this.dba_1 = weight;
|
|
1781
|
+
this.eba_1 = bias;
|
|
1782
|
+
this.fba_1 = batchNorm;
|
|
1783
|
+
this.gba_1 = activation;
|
|
1779
1784
|
}
|
|
1780
1785
|
protoOf(Layer).toString = function () {
|
|
1781
|
-
return 'Layer(inDim=' + this.
|
|
1786
|
+
return 'Layer(inDim=' + this.bba_1 + ', outDim=' + this.cba_1 + ', weight=' + toString_0(this.dba_1) + ', bias=' + toString_0(this.eba_1) + ', batchNorm=' + toString(this.fba_1) + ', activation=' + this.gba_1.toString() + ')';
|
|
1782
1787
|
};
|
|
1783
1788
|
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.
|
|
1789
|
+
var result = this.bba_1;
|
|
1790
|
+
result = imul(result, 31) + this.cba_1 | 0;
|
|
1791
|
+
result = imul(result, 31) + hashCode(this.dba_1) | 0;
|
|
1792
|
+
result = imul(result, 31) + hashCode(this.eba_1) | 0;
|
|
1793
|
+
result = imul(result, 31) + (this.fba_1 == null ? 0 : this.fba_1.hashCode()) | 0;
|
|
1794
|
+
result = imul(result, 31) + this.gba_1.hashCode() | 0;
|
|
1790
1795
|
return result;
|
|
1791
1796
|
};
|
|
1792
1797
|
protoOf(Layer).equals = function (other) {
|
|
@@ -1794,34 +1799,34 @@
|
|
|
1794
1799
|
return true;
|
|
1795
1800
|
if (!(other instanceof Layer))
|
|
1796
1801
|
return false;
|
|
1797
|
-
if (!(this.
|
|
1802
|
+
if (!(this.bba_1 === other.bba_1))
|
|
1798
1803
|
return false;
|
|
1799
|
-
if (!(this.
|
|
1804
|
+
if (!(this.cba_1 === other.cba_1))
|
|
1800
1805
|
return false;
|
|
1801
|
-
if (!equals(this.
|
|
1806
|
+
if (!equals(this.dba_1, other.dba_1))
|
|
1802
1807
|
return false;
|
|
1803
|
-
if (!equals(this.
|
|
1808
|
+
if (!equals(this.eba_1, other.eba_1))
|
|
1804
1809
|
return false;
|
|
1805
|
-
if (!equals(this.
|
|
1810
|
+
if (!equals(this.fba_1, other.fba_1))
|
|
1806
1811
|
return false;
|
|
1807
|
-
if (!this.
|
|
1812
|
+
if (!this.gba_1.equals(other.gba_1))
|
|
1808
1813
|
return false;
|
|
1809
1814
|
return true;
|
|
1810
1815
|
};
|
|
1811
1816
|
function BatchNormParams(gamma, beta, runningMean, runningVar) {
|
|
1812
|
-
this.
|
|
1813
|
-
this.
|
|
1814
|
-
this.
|
|
1815
|
-
this.
|
|
1817
|
+
this.hba_1 = gamma;
|
|
1818
|
+
this.iba_1 = beta;
|
|
1819
|
+
this.jba_1 = runningMean;
|
|
1820
|
+
this.kba_1 = runningVar;
|
|
1816
1821
|
}
|
|
1817
1822
|
protoOf(BatchNormParams).toString = function () {
|
|
1818
|
-
return 'BatchNormParams(gamma=' + toString_0(this.
|
|
1823
|
+
return 'BatchNormParams(gamma=' + toString_0(this.hba_1) + ', beta=' + toString_0(this.iba_1) + ', runningMean=' + toString_0(this.jba_1) + ', runningVar=' + toString_0(this.kba_1) + ')';
|
|
1819
1824
|
};
|
|
1820
1825
|
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.
|
|
1826
|
+
var result = hashCode(this.hba_1);
|
|
1827
|
+
result = imul(result, 31) + hashCode(this.iba_1) | 0;
|
|
1828
|
+
result = imul(result, 31) + hashCode(this.jba_1) | 0;
|
|
1829
|
+
result = imul(result, 31) + hashCode(this.kba_1) | 0;
|
|
1825
1830
|
return result;
|
|
1826
1831
|
};
|
|
1827
1832
|
protoOf(BatchNormParams).equals = function (other) {
|
|
@@ -1829,13 +1834,13 @@
|
|
|
1829
1834
|
return true;
|
|
1830
1835
|
if (!(other instanceof BatchNormParams))
|
|
1831
1836
|
return false;
|
|
1832
|
-
if (!equals(this.
|
|
1837
|
+
if (!equals(this.hba_1, other.hba_1))
|
|
1833
1838
|
return false;
|
|
1834
|
-
if (!equals(this.
|
|
1839
|
+
if (!equals(this.iba_1, other.iba_1))
|
|
1835
1840
|
return false;
|
|
1836
|
-
if (!equals(this.
|
|
1841
|
+
if (!equals(this.jba_1, other.jba_1))
|
|
1837
1842
|
return false;
|
|
1838
|
-
if (!equals(this.
|
|
1843
|
+
if (!equals(this.kba_1, other.kba_1))
|
|
1839
1844
|
return false;
|
|
1840
1845
|
return true;
|
|
1841
1846
|
};
|
|
@@ -1843,9 +1848,9 @@
|
|
|
1843
1848
|
Enum.call(this, name, ordinal);
|
|
1844
1849
|
}
|
|
1845
1850
|
function Companion_2() {
|
|
1846
|
-
this.
|
|
1851
|
+
this.rb8_1 = 1.0E-5;
|
|
1847
1852
|
}
|
|
1848
|
-
protoOf(Companion_2).
|
|
1853
|
+
protoOf(Companion_2).sb8 = function (logits) {
|
|
1849
1854
|
var max_0 = max(logits);
|
|
1850
1855
|
var tmp = 0;
|
|
1851
1856
|
var tmp_0 = logits.length;
|
|
@@ -1885,16 +1890,16 @@
|
|
|
1885
1890
|
return Activation_NONE_instance;
|
|
1886
1891
|
}
|
|
1887
1892
|
function PureKotlinInferenceEngine() {
|
|
1888
|
-
this.
|
|
1893
|
+
this.lba_1 = emptyList();
|
|
1889
1894
|
}
|
|
1890
|
-
protoOf(PureKotlinInferenceEngine).
|
|
1895
|
+
protoOf(PureKotlinInferenceEngine).ob8 = function (modelBytes) {
|
|
1891
1896
|
var buf = new ByteArrayReader(modelBytes);
|
|
1892
|
-
var layerCount = buf.
|
|
1897
|
+
var layerCount = buf.oba();
|
|
1893
1898
|
var tmp = 0;
|
|
1894
1899
|
var tmp_0 = layerCount + 1 | 0;
|
|
1895
1900
|
var tmp_1 = new Int32Array(tmp_0);
|
|
1896
1901
|
while (tmp < tmp_0) {
|
|
1897
|
-
tmp_1[tmp] = buf.
|
|
1902
|
+
tmp_1[tmp] = buf.oba();
|
|
1898
1903
|
tmp = tmp + 1 | 0;
|
|
1899
1904
|
}
|
|
1900
1905
|
var sizes = tmp_1;
|
|
@@ -1908,11 +1913,11 @@
|
|
|
1908
1913
|
var inDim = sizes[i];
|
|
1909
1914
|
var outDim = sizes[i + 1 | 0];
|
|
1910
1915
|
var isHidden = i < (layerCount - 1 | 0);
|
|
1911
|
-
var weight = buf.
|
|
1912
|
-
var bias = buf.
|
|
1916
|
+
var weight = buf.pba(imul(inDim, outDim));
|
|
1917
|
+
var bias = buf.pba(outDim);
|
|
1913
1918
|
var tmp_2;
|
|
1914
1919
|
if (isHidden) {
|
|
1915
|
-
tmp_2 = new BatchNormParams(buf.
|
|
1920
|
+
tmp_2 = new BatchNormParams(buf.pba(outDim), buf.pba(outDim), buf.pba(outDim), buf.pba(outDim));
|
|
1916
1921
|
} else {
|
|
1917
1922
|
tmp_2 = null;
|
|
1918
1923
|
}
|
|
@@ -1922,17 +1927,17 @@
|
|
|
1922
1927
|
parsed.e1(element);
|
|
1923
1928
|
}
|
|
1924
1929
|
while (inductionVariable < layerCount);
|
|
1925
|
-
this.
|
|
1930
|
+
this.lba_1 = parsed;
|
|
1926
1931
|
};
|
|
1927
|
-
protoOf(PureKotlinInferenceEngine).
|
|
1932
|
+
protoOf(PureKotlinInferenceEngine).qb8 = function (input) {
|
|
1928
1933
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1929
1934
|
// Inline function 'kotlin.check' call
|
|
1930
|
-
if (!!this.
|
|
1935
|
+
if (!!this.lba_1.r()) {
|
|
1931
1936
|
var message = 'Model not loaded. Call loadModel() first.';
|
|
1932
1937
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
1933
1938
|
}
|
|
1934
1939
|
var x = input;
|
|
1935
|
-
var _iterator__ex2g4s = this.
|
|
1940
|
+
var _iterator__ex2g4s = this.lba_1.t();
|
|
1936
1941
|
while (_iterator__ex2g4s.u()) {
|
|
1937
1942
|
var layer = _iterator__ex2g4s.v();
|
|
1938
1943
|
x = forward(this, layer, x);
|
|
@@ -1940,34 +1945,34 @@
|
|
|
1940
1945
|
return x;
|
|
1941
1946
|
};
|
|
1942
1947
|
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.
|
|
1948
|
+
this.mba_1 = data;
|
|
1949
|
+
this.nba_1 = 0;
|
|
1950
|
+
}
|
|
1951
|
+
protoOf(ByteArrayReader).oba = function () {
|
|
1952
|
+
var _unary__edvuaz = this.nba_1;
|
|
1953
|
+
this.nba_1 = _unary__edvuaz + 1 | 0;
|
|
1954
|
+
var b0 = this.mba_1[_unary__edvuaz] & 255;
|
|
1955
|
+
var _unary__edvuaz_0 = this.nba_1;
|
|
1956
|
+
this.nba_1 = _unary__edvuaz_0 + 1 | 0;
|
|
1957
|
+
var b1 = this.mba_1[_unary__edvuaz_0] & 255;
|
|
1958
|
+
var _unary__edvuaz_1 = this.nba_1;
|
|
1959
|
+
this.nba_1 = _unary__edvuaz_1 + 1 | 0;
|
|
1960
|
+
var b2 = this.mba_1[_unary__edvuaz_1] & 255;
|
|
1961
|
+
var _unary__edvuaz_2 = this.nba_1;
|
|
1962
|
+
this.nba_1 = _unary__edvuaz_2 + 1 | 0;
|
|
1963
|
+
var b3 = this.mba_1[_unary__edvuaz_2] & 255;
|
|
1959
1964
|
return b0 | b1 << 8 | b2 << 16 | b3 << 24;
|
|
1960
1965
|
};
|
|
1961
|
-
protoOf(ByteArrayReader).
|
|
1966
|
+
protoOf(ByteArrayReader).qba = function () {
|
|
1962
1967
|
// Inline function 'kotlin.fromBits' call
|
|
1963
|
-
var bits = this.
|
|
1968
|
+
var bits = this.oba();
|
|
1964
1969
|
return floatFromBits(bits);
|
|
1965
1970
|
};
|
|
1966
|
-
protoOf(ByteArrayReader).
|
|
1971
|
+
protoOf(ByteArrayReader).pba = function (size) {
|
|
1967
1972
|
var tmp = 0;
|
|
1968
1973
|
var tmp_0 = new Float32Array(size);
|
|
1969
1974
|
while (tmp < size) {
|
|
1970
|
-
tmp_0[tmp] = this.
|
|
1975
|
+
tmp_0[tmp] = this.qba();
|
|
1971
1976
|
tmp = tmp + 1 | 0;
|
|
1972
1977
|
}
|
|
1973
1978
|
return tmp_0;
|
|
@@ -1977,15 +1982,15 @@
|
|
|
1977
1982
|
return Math.sqrt(x);
|
|
1978
1983
|
}
|
|
1979
1984
|
function finishTrick($this, state) {
|
|
1980
|
-
var playersInOrder = Companion_instance_5.
|
|
1985
|
+
var playersInOrder = Companion_instance_5.cbb(state.rba_1, state.abb_1);
|
|
1981
1986
|
// Inline function 'kotlin.collections.map' call
|
|
1982
|
-
var this_0 = state.
|
|
1987
|
+
var this_0 = state.uba_1;
|
|
1983
1988
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1984
1989
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1985
1990
|
var _iterator__ex2g4s = this_0.t();
|
|
1986
1991
|
while (_iterator__ex2g4s.u()) {
|
|
1987
1992
|
var item = _iterator__ex2g4s.v();
|
|
1988
|
-
var tmp$ret$0 = item.
|
|
1993
|
+
var tmp$ret$0 = item.dbb_1;
|
|
1989
1994
|
destination.e1(tmp$ret$0);
|
|
1990
1995
|
}
|
|
1991
1996
|
var alreadyPlayed = toSet(destination);
|
|
@@ -1999,8 +2004,8 @@
|
|
|
1999
2004
|
resolveTrickAndAdvance($this, state);
|
|
2000
2005
|
}
|
|
2001
2006
|
function playFullTrick($this, state) {
|
|
2002
|
-
state.
|
|
2003
|
-
var playersInOrder = Companion_instance_5.
|
|
2007
|
+
state.uba_1.b3();
|
|
2008
|
+
var playersInOrder = Companion_instance_5.cbb(state.rba_1, state.abb_1);
|
|
2004
2009
|
var _iterator__ex2g4s = playersInOrder.t();
|
|
2005
2010
|
while (_iterator__ex2g4s.u()) {
|
|
2006
2011
|
var pid = _iterator__ex2g4s.v();
|
|
@@ -2009,7 +2014,7 @@
|
|
|
2009
2014
|
resolveTrickAndAdvance($this, state);
|
|
2010
2015
|
}
|
|
2011
2016
|
function playCard($this, state, playerId) {
|
|
2012
|
-
var tmp0_elvis_lhs = state.
|
|
2017
|
+
var tmp0_elvis_lhs = state.sba_1.v2(playerId);
|
|
2013
2018
|
var tmp;
|
|
2014
2019
|
if (tmp0_elvis_lhs == null) {
|
|
2015
2020
|
return Unit_instance;
|
|
@@ -2019,15 +2024,15 @@
|
|
|
2019
2024
|
var hand = tmp;
|
|
2020
2025
|
if (hand.r())
|
|
2021
2026
|
return Unit_instance;
|
|
2022
|
-
var partnerPid = Companion_instance_5.
|
|
2027
|
+
var partnerPid = Companion_instance_5.fbb(playerId, state.rba_1, state.xba_1);
|
|
2023
2028
|
var partnerWinning = isPartnerWinning($this, state, partnerPid);
|
|
2024
|
-
var legalCards = TrickSimulator_instance.
|
|
2025
|
-
var useRandom = $this.
|
|
2029
|
+
var legalCards = TrickSimulator_instance.gb9(hand, state.uba_1, state.tba_1, state.yba_1, state.xba_1, playerId, partnerPid);
|
|
2030
|
+
var useRandom = $this.ibb_1 && !isFocalTeam($this, playerId, state);
|
|
2026
2031
|
var isFocal = isFocalTeam($this, playerId, state);
|
|
2027
2032
|
var tmp_0;
|
|
2028
2033
|
if (!useRandom && isFocal) {
|
|
2029
2034
|
// Inline function 'kotlin.collections.filter' call
|
|
2030
|
-
var tmp0 = state.
|
|
2035
|
+
var tmp0 = state.sba_1.m1();
|
|
2031
2036
|
// Inline function 'kotlin.collections.filterTo' call
|
|
2032
2037
|
var destination = ArrayList_init_$Create$();
|
|
2033
2038
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -2053,50 +2058,50 @@
|
|
|
2053
2058
|
var opponentCards = tmp_0;
|
|
2054
2059
|
var tmp_1;
|
|
2055
2060
|
if (useRandom) {
|
|
2056
|
-
tmp_1 = random(legalCards, $this.
|
|
2061
|
+
tmp_1 = random(legalCards, $this.hbb_1);
|
|
2057
2062
|
} else {
|
|
2058
|
-
tmp_1 = $this.
|
|
2063
|
+
tmp_1 = $this.gbb_1.lbb(hand, legalCards, state.uba_1, state.tba_1, partnerPid, partnerWinning, opponentCards);
|
|
2059
2064
|
}
|
|
2060
2065
|
var card = tmp_1;
|
|
2061
2066
|
hand.y2(card);
|
|
2062
|
-
state.
|
|
2067
|
+
state.uba_1.e1(new SimCard(playerId, card));
|
|
2063
2068
|
}
|
|
2064
2069
|
function isFocalTeam($this, playerId, state) {
|
|
2065
|
-
if (playerId === state.
|
|
2070
|
+
if (playerId === state.zba_1)
|
|
2066
2071
|
return true;
|
|
2067
|
-
if (!state.
|
|
2072
|
+
if (!state.xba_1.isTeamGame || !(state.rba_1.g1() === 4))
|
|
2068
2073
|
return false;
|
|
2069
|
-
var focalIndex = state.
|
|
2070
|
-
var partnerIndex = (focalIndex + 2 | 0) % state.
|
|
2071
|
-
return playerId === state.
|
|
2074
|
+
var focalIndex = state.rba_1.o2(state.zba_1);
|
|
2075
|
+
var partnerIndex = (focalIndex + 2 | 0) % state.rba_1.g1() | 0;
|
|
2076
|
+
return playerId === state.rba_1.h1(partnerIndex);
|
|
2072
2077
|
}
|
|
2073
2078
|
function resolveTrickAndAdvance($this, state) {
|
|
2074
|
-
var result = TrickSimulator_instance.
|
|
2075
|
-
var tmp0 = state.
|
|
2076
|
-
var tmp2 = result.
|
|
2077
|
-
var tmp0_elvis_lhs = state.
|
|
2079
|
+
var result = TrickSimulator_instance.mbb(state.uba_1, state.tba_1);
|
|
2080
|
+
var tmp0 = state.wba_1;
|
|
2081
|
+
var tmp2 = result.nbb_1;
|
|
2082
|
+
var tmp0_elvis_lhs = state.wba_1.v2(result.nbb_1);
|
|
2078
2083
|
// Inline function 'kotlin.collections.set' call
|
|
2079
|
-
var value = (tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) + result.
|
|
2084
|
+
var value = (tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) + result.obb_1 | 0;
|
|
2080
2085
|
tmp0.g3(tmp2, value);
|
|
2081
|
-
state.
|
|
2082
|
-
state.
|
|
2083
|
-
state.
|
|
2086
|
+
state.abb_1 = result.nbb_1;
|
|
2087
|
+
state.vba_1 = state.vba_1 + 1 | 0;
|
|
2088
|
+
state.uba_1.b3();
|
|
2084
2089
|
}
|
|
2085
2090
|
function computeResult($this, state) {
|
|
2086
|
-
var focalIndex = state.
|
|
2087
|
-
var n = state.
|
|
2091
|
+
var focalIndex = state.rba_1.o2(state.zba_1);
|
|
2092
|
+
var n = state.rba_1.g1();
|
|
2088
2093
|
var tmp;
|
|
2089
|
-
if (state.
|
|
2094
|
+
if (state.xba_1.isTeamGame && n === 4) {
|
|
2090
2095
|
var partnerIndex = (focalIndex + 2 | 0) % n | 0;
|
|
2091
|
-
tmp = setOf_0([state.
|
|
2096
|
+
tmp = setOf_0([state.rba_1.h1(focalIndex), state.rba_1.h1(partnerIndex)]);
|
|
2092
2097
|
} else {
|
|
2093
|
-
tmp = setOf(state.
|
|
2098
|
+
tmp = setOf(state.zba_1);
|
|
2094
2099
|
}
|
|
2095
2100
|
var focalTeam = tmp;
|
|
2096
2101
|
var focalPts = 0;
|
|
2097
2102
|
var oppPts = 0;
|
|
2098
2103
|
// Inline function 'kotlin.collections.iterator' call
|
|
2099
|
-
var _iterator__ex2g4s = state.
|
|
2104
|
+
var _iterator__ex2g4s = state.wba_1.m1().t();
|
|
2100
2105
|
while (_iterator__ex2g4s.u()) {
|
|
2101
2106
|
var _destruct__k2r9zo = _iterator__ex2g4s.v();
|
|
2102
2107
|
// Inline function 'kotlin.collections.component1' call
|
|
@@ -2111,10 +2116,10 @@
|
|
|
2111
2116
|
return new RolloutResult(focalPts, oppPts);
|
|
2112
2117
|
}
|
|
2113
2118
|
function isPartnerWinning($this, state, partnerPid) {
|
|
2114
|
-
if (partnerPid == null || state.
|
|
2119
|
+
if (partnerPid == null || state.uba_1.r())
|
|
2115
2120
|
return false;
|
|
2116
|
-
var firstSuit = first(state.
|
|
2117
|
-
var tmp0 = state.
|
|
2121
|
+
var firstSuit = first(state.uba_1).ebb_1.x6l();
|
|
2122
|
+
var tmp0 = state.uba_1;
|
|
2118
2123
|
var tmp$ret$0;
|
|
2119
2124
|
$l$block_0: {
|
|
2120
2125
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -2129,10 +2134,10 @@
|
|
|
2129
2134
|
break $l$block_0;
|
|
2130
2135
|
}
|
|
2131
2136
|
var it = maxElem;
|
|
2132
|
-
var maxValue = getGrowth(it.
|
|
2137
|
+
var maxValue = getGrowth(it.ebb_1, state.tba_1, firstSuit);
|
|
2133
2138
|
do {
|
|
2134
2139
|
var e = iterator.v();
|
|
2135
|
-
var v = getGrowth(e.
|
|
2140
|
+
var v = getGrowth(e.ebb_1, state.tba_1, firstSuit);
|
|
2136
2141
|
if (compareTo(maxValue, v) < 0) {
|
|
2137
2142
|
maxElem = e;
|
|
2138
2143
|
maxValue = v;
|
|
@@ -2142,12 +2147,12 @@
|
|
|
2142
2147
|
tmp$ret$0 = maxElem;
|
|
2143
2148
|
}
|
|
2144
2149
|
var winner = tmp$ret$0;
|
|
2145
|
-
return (winner == null ? null : winner.
|
|
2150
|
+
return (winner == null ? null : winner.dbb_1) == partnerPid;
|
|
2146
2151
|
}
|
|
2147
2152
|
function Companion_3() {
|
|
2148
|
-
this.
|
|
2153
|
+
this.bbb_1 = 10;
|
|
2149
2154
|
}
|
|
2150
|
-
protoOf(Companion_3).
|
|
2155
|
+
protoOf(Companion_3).cbb = function (playerOrder, leadId) {
|
|
2151
2156
|
var startIdx = coerceAtLeast_0(playerOrder.o2(leadId), 0);
|
|
2152
2157
|
// Inline function 'kotlin.collections.List' call
|
|
2153
2158
|
// Inline function 'kotlin.collections.MutableList' call
|
|
@@ -2165,7 +2170,7 @@
|
|
|
2165
2170
|
while (inductionVariable < size);
|
|
2166
2171
|
return list;
|
|
2167
2172
|
};
|
|
2168
|
-
protoOf(Companion_3).
|
|
2173
|
+
protoOf(Companion_3).fbb = function (playerId, playerOrder, playersMode) {
|
|
2169
2174
|
if (!playersMode.isTeamGame || !(playerOrder.g1() === 4))
|
|
2170
2175
|
return null;
|
|
2171
2176
|
var idx = playerOrder.o2(playerId);
|
|
@@ -2182,15 +2187,15 @@
|
|
|
2182
2187
|
randomOpponentRollout = randomOpponentRollout === VOID ? false : randomOpponentRollout;
|
|
2183
2188
|
endgameSolver = endgameSolver === VOID ? null : endgameSolver;
|
|
2184
2189
|
endgameThreshold = endgameThreshold === VOID ? 5 : endgameThreshold;
|
|
2185
|
-
this.
|
|
2186
|
-
this.
|
|
2187
|
-
this.
|
|
2188
|
-
this.
|
|
2189
|
-
this.
|
|
2190
|
+
this.gbb_1 = rolloutPolicy;
|
|
2191
|
+
this.hbb_1 = random;
|
|
2192
|
+
this.ibb_1 = randomOpponentRollout;
|
|
2193
|
+
this.jbb_1 = endgameSolver;
|
|
2194
|
+
this.kbb_1 = endgameThreshold;
|
|
2190
2195
|
}
|
|
2191
|
-
protoOf(DeterministicRollout).
|
|
2196
|
+
protoOf(DeterministicRollout).pbb = function (initialState) {
|
|
2192
2197
|
var state = initialState;
|
|
2193
|
-
var tmp0 = state.
|
|
2198
|
+
var tmp0 = state.sba_1.x2();
|
|
2194
2199
|
var tmp$ret$0;
|
|
2195
2200
|
$l$block: {
|
|
2196
2201
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -2210,21 +2215,21 @@
|
|
|
2210
2215
|
}
|
|
2211
2216
|
var tmp0_elvis_lhs = tmp$ret$0;
|
|
2212
2217
|
var maxTricks = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
|
|
2213
|
-
var tmp = state.
|
|
2218
|
+
var tmp = state.vba_1 + maxTricks | 0;
|
|
2214
2219
|
var tmp_0;
|
|
2215
2220
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2216
|
-
if (!state.
|
|
2221
|
+
if (!state.uba_1.r()) {
|
|
2217
2222
|
tmp_0 = 1;
|
|
2218
2223
|
} else {
|
|
2219
2224
|
tmp_0 = 0;
|
|
2220
2225
|
}
|
|
2221
2226
|
var totalTricks = tmp + tmp_0 | 0;
|
|
2222
2227
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2223
|
-
if (!state.
|
|
2228
|
+
if (!state.uba_1.r()) {
|
|
2224
2229
|
finishTrick(this, state);
|
|
2225
2230
|
}
|
|
2226
2231
|
$l$loop: while (true) {
|
|
2227
|
-
var tmp0_0 = state.
|
|
2232
|
+
var tmp0_0 = state.sba_1.x2();
|
|
2228
2233
|
var tmp$ret$5;
|
|
2229
2234
|
$l$block_1: {
|
|
2230
2235
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -2252,8 +2257,8 @@
|
|
|
2252
2257
|
if (!tmp$ret$5) {
|
|
2253
2258
|
break $l$loop;
|
|
2254
2259
|
}
|
|
2255
|
-
if (!(this.
|
|
2256
|
-
var tmp1_safe_receiver = this.
|
|
2260
|
+
if (!(this.jbb_1 == null)) {
|
|
2261
|
+
var tmp1_safe_receiver = this.jbb_1.qbb(state, this.kbb_1);
|
|
2257
2262
|
if (tmp1_safe_receiver == null)
|
|
2258
2263
|
null;
|
|
2259
2264
|
else {
|
|
@@ -2263,40 +2268,40 @@
|
|
|
2263
2268
|
}
|
|
2264
2269
|
playFullTrick(this, state);
|
|
2265
2270
|
}
|
|
2266
|
-
var lastTrickWinner = state.
|
|
2267
|
-
var tmp0_1 = state.
|
|
2268
|
-
var tmp2_elvis_lhs = state.
|
|
2271
|
+
var lastTrickWinner = state.abb_1;
|
|
2272
|
+
var tmp0_1 = state.wba_1;
|
|
2273
|
+
var tmp2_elvis_lhs = state.wba_1.v2(lastTrickWinner);
|
|
2269
2274
|
// Inline function 'kotlin.collections.set' call
|
|
2270
2275
|
var value = (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) + 10 | 0;
|
|
2271
2276
|
tmp0_1.g3(lastTrickWinner, value);
|
|
2272
2277
|
return computeResult(this, state);
|
|
2273
2278
|
};
|
|
2274
2279
|
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.
|
|
2280
|
+
this.rba_1 = playerOrder;
|
|
2281
|
+
this.sba_1 = hands;
|
|
2282
|
+
this.tba_1 = trump;
|
|
2283
|
+
this.uba_1 = currentTrick;
|
|
2284
|
+
this.vba_1 = trickNumber;
|
|
2285
|
+
this.wba_1 = points;
|
|
2286
|
+
this.xba_1 = playersMode;
|
|
2287
|
+
this.yba_1 = rules;
|
|
2288
|
+
this.zba_1 = focalPlayerId;
|
|
2289
|
+
this.abb_1 = leadPlayerId;
|
|
2285
2290
|
}
|
|
2286
2291
|
protoOf(RolloutState).toString = function () {
|
|
2287
|
-
return 'RolloutState(playerOrder=' + toString_0(this.
|
|
2292
|
+
return 'RolloutState(playerOrder=' + toString_0(this.rba_1) + ', hands=' + toString_0(this.sba_1) + ', trump=' + this.tba_1.toString() + ', currentTrick=' + toString_0(this.uba_1) + ', trickNumber=' + this.vba_1 + ', points=' + toString_0(this.wba_1) + ', playersMode=' + this.xba_1.toString() + ', rules=' + this.yba_1.toString() + ', focalPlayerId=' + this.zba_1 + ', leadPlayerId=' + this.abb_1 + ')';
|
|
2288
2293
|
};
|
|
2289
2294
|
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.
|
|
2295
|
+
var result = hashCode(this.rba_1);
|
|
2296
|
+
result = imul(result, 31) + hashCode(this.sba_1) | 0;
|
|
2297
|
+
result = imul(result, 31) + this.tba_1.hashCode() | 0;
|
|
2298
|
+
result = imul(result, 31) + hashCode(this.uba_1) | 0;
|
|
2299
|
+
result = imul(result, 31) + this.vba_1 | 0;
|
|
2300
|
+
result = imul(result, 31) + hashCode(this.wba_1) | 0;
|
|
2301
|
+
result = imul(result, 31) + this.xba_1.hashCode() | 0;
|
|
2302
|
+
result = imul(result, 31) + this.yba_1.hashCode() | 0;
|
|
2303
|
+
result = imul(result, 31) + getStringHashCode(this.zba_1) | 0;
|
|
2304
|
+
result = imul(result, 31) + getStringHashCode(this.abb_1) | 0;
|
|
2300
2305
|
return result;
|
|
2301
2306
|
};
|
|
2302
2307
|
protoOf(RolloutState).equals = function (other) {
|
|
@@ -2304,38 +2309,38 @@
|
|
|
2304
2309
|
return true;
|
|
2305
2310
|
if (!(other instanceof RolloutState))
|
|
2306
2311
|
return false;
|
|
2307
|
-
if (!equals(this.
|
|
2312
|
+
if (!equals(this.rba_1, other.rba_1))
|
|
2308
2313
|
return false;
|
|
2309
|
-
if (!equals(this.
|
|
2314
|
+
if (!equals(this.sba_1, other.sba_1))
|
|
2310
2315
|
return false;
|
|
2311
|
-
if (!this.
|
|
2316
|
+
if (!this.tba_1.equals(other.tba_1))
|
|
2312
2317
|
return false;
|
|
2313
|
-
if (!equals(this.
|
|
2318
|
+
if (!equals(this.uba_1, other.uba_1))
|
|
2314
2319
|
return false;
|
|
2315
|
-
if (!(this.
|
|
2320
|
+
if (!(this.vba_1 === other.vba_1))
|
|
2316
2321
|
return false;
|
|
2317
|
-
if (!equals(this.
|
|
2322
|
+
if (!equals(this.wba_1, other.wba_1))
|
|
2318
2323
|
return false;
|
|
2319
|
-
if (!this.
|
|
2324
|
+
if (!this.xba_1.equals(other.xba_1))
|
|
2320
2325
|
return false;
|
|
2321
|
-
if (!this.
|
|
2326
|
+
if (!this.yba_1.equals(other.yba_1))
|
|
2322
2327
|
return false;
|
|
2323
|
-
if (!(this.
|
|
2328
|
+
if (!(this.zba_1 === other.zba_1))
|
|
2324
2329
|
return false;
|
|
2325
|
-
if (!(this.
|
|
2330
|
+
if (!(this.abb_1 === other.abb_1))
|
|
2326
2331
|
return false;
|
|
2327
2332
|
return true;
|
|
2328
2333
|
};
|
|
2329
2334
|
function RolloutResult(focalTeamPoints, opponentTeamPoints) {
|
|
2330
|
-
this.
|
|
2331
|
-
this.
|
|
2335
|
+
this.rbb_1 = focalTeamPoints;
|
|
2336
|
+
this.sbb_1 = opponentTeamPoints;
|
|
2332
2337
|
}
|
|
2333
2338
|
protoOf(RolloutResult).toString = function () {
|
|
2334
|
-
return 'RolloutResult(focalTeamPoints=' + this.
|
|
2339
|
+
return 'RolloutResult(focalTeamPoints=' + this.rbb_1 + ', opponentTeamPoints=' + this.sbb_1 + ')';
|
|
2335
2340
|
};
|
|
2336
2341
|
protoOf(RolloutResult).hashCode = function () {
|
|
2337
|
-
var result = this.
|
|
2338
|
-
result = imul(result, 31) + this.
|
|
2342
|
+
var result = this.rbb_1;
|
|
2343
|
+
result = imul(result, 31) + this.sbb_1 | 0;
|
|
2339
2344
|
return result;
|
|
2340
2345
|
};
|
|
2341
2346
|
protoOf(RolloutResult).equals = function (other) {
|
|
@@ -2343,22 +2348,22 @@
|
|
|
2343
2348
|
return true;
|
|
2344
2349
|
if (!(other instanceof RolloutResult))
|
|
2345
2350
|
return false;
|
|
2346
|
-
if (!(this.
|
|
2351
|
+
if (!(this.rbb_1 === other.rbb_1))
|
|
2347
2352
|
return false;
|
|
2348
|
-
if (!(this.
|
|
2353
|
+
if (!(this.sbb_1 === other.sbb_1))
|
|
2349
2354
|
return false;
|
|
2350
2355
|
return true;
|
|
2351
2356
|
};
|
|
2352
2357
|
function WorldMoveScore(action, normalizedScore) {
|
|
2353
|
-
this.
|
|
2354
|
-
this.
|
|
2358
|
+
this.tbb_1 = action;
|
|
2359
|
+
this.ubb_1 = normalizedScore;
|
|
2355
2360
|
}
|
|
2356
2361
|
protoOf(WorldMoveScore).toString = function () {
|
|
2357
|
-
return 'WorldMoveScore(action=' + toString_0(this.
|
|
2362
|
+
return 'WorldMoveScore(action=' + toString_0(this.tbb_1) + ', normalizedScore=' + this.ubb_1 + ')';
|
|
2358
2363
|
};
|
|
2359
2364
|
protoOf(WorldMoveScore).hashCode = function () {
|
|
2360
|
-
var result = hashCode(this.
|
|
2361
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2365
|
+
var result = hashCode(this.tbb_1);
|
|
2366
|
+
result = imul(result, 31) + getNumberHashCode(this.ubb_1) | 0;
|
|
2362
2367
|
return result;
|
|
2363
2368
|
};
|
|
2364
2369
|
protoOf(WorldMoveScore).equals = function (other) {
|
|
@@ -2366,15 +2371,15 @@
|
|
|
2366
2371
|
return true;
|
|
2367
2372
|
if (!(other instanceof WorldMoveScore))
|
|
2368
2373
|
return false;
|
|
2369
|
-
if (!equals(this.
|
|
2374
|
+
if (!equals(this.tbb_1, other.tbb_1))
|
|
2370
2375
|
return false;
|
|
2371
|
-
if (!equals(this.
|
|
2376
|
+
if (!equals(this.ubb_1, other.ubb_1))
|
|
2372
2377
|
return false;
|
|
2373
2378
|
return true;
|
|
2374
2379
|
};
|
|
2375
2380
|
function MoveScoreAggregator() {
|
|
2376
2381
|
}
|
|
2377
|
-
protoOf(MoveScoreAggregator).
|
|
2382
|
+
protoOf(MoveScoreAggregator).vbb = function (worldScores, config) {
|
|
2378
2383
|
if (worldScores.r())
|
|
2379
2384
|
return emptyMap();
|
|
2380
2385
|
// Inline function 'kotlin.collections.flatMap' call
|
|
@@ -2389,7 +2394,7 @@
|
|
|
2389
2394
|
var _iterator__ex2g4s_0 = element.t();
|
|
2390
2395
|
while (_iterator__ex2g4s_0.u()) {
|
|
2391
2396
|
var item = _iterator__ex2g4s_0.v();
|
|
2392
|
-
var tmp$ret$0 = item.
|
|
2397
|
+
var tmp$ret$0 = item.tbb_1;
|
|
2393
2398
|
destination_0.e1(tmp$ret$0);
|
|
2394
2399
|
}
|
|
2395
2400
|
var list = destination_0;
|
|
@@ -2416,7 +2421,7 @@
|
|
|
2416
2421
|
var _iterator__ex2g4s_3 = item_0.t();
|
|
2417
2422
|
while (_iterator__ex2g4s_3.u()) {
|
|
2418
2423
|
var element_1 = _iterator__ex2g4s_3.v();
|
|
2419
|
-
if (equals(element_1.
|
|
2424
|
+
if (equals(element_1.tbb_1, element_0)) {
|
|
2420
2425
|
tmp$ret$7 = element_1;
|
|
2421
2426
|
break $l$block;
|
|
2422
2427
|
}
|
|
@@ -2424,7 +2429,7 @@
|
|
|
2424
2429
|
tmp$ret$7 = null;
|
|
2425
2430
|
}
|
|
2426
2431
|
var tmp0_safe_receiver = tmp$ret$7;
|
|
2427
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2432
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ubb_1;
|
|
2428
2433
|
var tmp$ret$8 = tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs;
|
|
2429
2434
|
destination_1.e1(tmp$ret$8);
|
|
2430
2435
|
}
|
|
@@ -2445,7 +2450,7 @@
|
|
|
2445
2450
|
destination_2.g3(tmp, tmp$ret$16);
|
|
2446
2451
|
}
|
|
2447
2452
|
var avgScores = destination_2;
|
|
2448
|
-
if (!config.
|
|
2453
|
+
if (!config.ybb_1) {
|
|
2449
2454
|
return avgScores;
|
|
2450
2455
|
}
|
|
2451
2456
|
// Inline function 'kotlin.collections.associateWith' call
|
|
@@ -2500,7 +2505,7 @@
|
|
|
2500
2505
|
var tmp0_elvis_lhs = avgScores.v2(element_4);
|
|
2501
2506
|
var tmp_0 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
|
|
2502
2507
|
var tmp1_elvis_lhs_3 = maxRegrets.v2(element_4);
|
|
2503
|
-
var tmp$ret$27 = tmp_0 - config.
|
|
2508
|
+
var tmp$ret$27 = tmp_0 - config.zbb_1 * (tmp1_elvis_lhs_3 == null ? 0.0 : tmp1_elvis_lhs_3);
|
|
2504
2509
|
result_1.g3(element_4, tmp$ret$27);
|
|
2505
2510
|
}
|
|
2506
2511
|
return result_1;
|
|
@@ -2516,23 +2521,23 @@
|
|
|
2516
2521
|
variancePenalty = variancePenalty === VOID ? 0.3 : variancePenalty;
|
|
2517
2522
|
randomOpponentRollout = randomOpponentRollout === VOID ? false : randomOpponentRollout;
|
|
2518
2523
|
endgameSolveThreshold = endgameSolveThreshold === VOID ? 0 : endgameSolveThreshold;
|
|
2519
|
-
this.
|
|
2520
|
-
this.
|
|
2521
|
-
this.
|
|
2522
|
-
this.
|
|
2523
|
-
this.
|
|
2524
|
-
this.
|
|
2524
|
+
this.wbb_1 = worldCount;
|
|
2525
|
+
this.xbb_1 = exactSolveThreshold;
|
|
2526
|
+
this.ybb_1 = enableStrategyFusionMitigation;
|
|
2527
|
+
this.zbb_1 = variancePenalty;
|
|
2528
|
+
this.abc_1 = randomOpponentRollout;
|
|
2529
|
+
this.bbc_1 = endgameSolveThreshold;
|
|
2525
2530
|
}
|
|
2526
2531
|
protoOf(PimcConfig).toString = function () {
|
|
2527
|
-
return 'PimcConfig(worldCount=' + this.
|
|
2532
|
+
return 'PimcConfig(worldCount=' + this.wbb_1 + ', exactSolveThreshold=' + this.xbb_1 + ', enableStrategyFusionMitigation=' + this.ybb_1 + ', variancePenalty=' + this.zbb_1 + ', randomOpponentRollout=' + this.abc_1 + ', endgameSolveThreshold=' + this.bbc_1 + ')';
|
|
2528
2533
|
};
|
|
2529
2534
|
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.
|
|
2535
|
+
var result = this.wbb_1;
|
|
2536
|
+
result = imul(result, 31) + this.xbb_1 | 0;
|
|
2537
|
+
result = imul(result, 31) + getBooleanHashCode(this.ybb_1) | 0;
|
|
2538
|
+
result = imul(result, 31) + getNumberHashCode(this.zbb_1) | 0;
|
|
2539
|
+
result = imul(result, 31) + getBooleanHashCode(this.abc_1) | 0;
|
|
2540
|
+
result = imul(result, 31) + this.bbc_1 | 0;
|
|
2536
2541
|
return result;
|
|
2537
2542
|
};
|
|
2538
2543
|
protoOf(PimcConfig).equals = function (other) {
|
|
@@ -2540,17 +2545,17 @@
|
|
|
2540
2545
|
return true;
|
|
2541
2546
|
if (!(other instanceof PimcConfig))
|
|
2542
2547
|
return false;
|
|
2543
|
-
if (!(this.
|
|
2548
|
+
if (!(this.wbb_1 === other.wbb_1))
|
|
2544
2549
|
return false;
|
|
2545
|
-
if (!(this.
|
|
2550
|
+
if (!(this.xbb_1 === other.xbb_1))
|
|
2546
2551
|
return false;
|
|
2547
|
-
if (!(this.
|
|
2552
|
+
if (!(this.ybb_1 === other.ybb_1))
|
|
2548
2553
|
return false;
|
|
2549
|
-
if (!equals(this.
|
|
2554
|
+
if (!equals(this.zbb_1, other.zbb_1))
|
|
2550
2555
|
return false;
|
|
2551
|
-
if (!(this.
|
|
2556
|
+
if (!(this.abc_1 === other.abc_1))
|
|
2552
2557
|
return false;
|
|
2553
|
-
if (!(this.
|
|
2558
|
+
if (!(this.bbc_1 === other.bbc_1))
|
|
2554
2559
|
return false;
|
|
2555
2560
|
return true;
|
|
2556
2561
|
};
|
|
@@ -2558,7 +2563,7 @@
|
|
|
2558
2563
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
2559
2564
|
var hands = LinkedHashMap_init_$Create$();
|
|
2560
2565
|
// Inline function 'kotlin.collections.iterator' call
|
|
2561
|
-
var _iterator__ex2g4s = world.
|
|
2566
|
+
var _iterator__ex2g4s = world.cbc_1.m1().t();
|
|
2562
2567
|
while (_iterator__ex2g4s.u()) {
|
|
2563
2568
|
var _destruct__k2r9zo = _iterator__ex2g4s.v();
|
|
2564
2569
|
// Inline function 'kotlin.collections.component1' call
|
|
@@ -2569,61 +2574,61 @@
|
|
|
2569
2574
|
var value = toMutableList(cards);
|
|
2570
2575
|
hands.g3(pid, value);
|
|
2571
2576
|
}
|
|
2572
|
-
var focalHand = toMutableList(state.
|
|
2573
|
-
focalHand.y2(action.
|
|
2577
|
+
var focalHand = toMutableList(state.wb6_1);
|
|
2578
|
+
focalHand.y2(action.qb6_1);
|
|
2574
2579
|
// Inline function 'kotlin.collections.set' call
|
|
2575
|
-
var key = state.
|
|
2580
|
+
var key = state.ub6_1;
|
|
2576
2581
|
hands.g3(key, focalHand);
|
|
2577
2582
|
// Inline function 'kotlin.collections.map' call
|
|
2578
|
-
var this_0 = state.
|
|
2583
|
+
var this_0 = state.yb6_1;
|
|
2579
2584
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2580
2585
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
2581
2586
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
2582
2587
|
while (_iterator__ex2g4s_0.u()) {
|
|
2583
2588
|
var item = _iterator__ex2g4s_0.v();
|
|
2584
|
-
var tmp$ret$6 = new SimCard(item.
|
|
2589
|
+
var tmp$ret$6 = new SimCard(item.r8k_1, item.t8k_1);
|
|
2585
2590
|
destination.e1(tmp$ret$6);
|
|
2586
2591
|
}
|
|
2587
2592
|
var currentTrick = toMutableList(destination);
|
|
2588
|
-
currentTrick.e1(new SimCard(state.
|
|
2593
|
+
currentTrick.e1(new SimCard(state.ub6_1, action.qb6_1));
|
|
2589
2594
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
2590
2595
|
var points = LinkedHashMap_init_$Create$();
|
|
2591
|
-
var tmp2 = state.
|
|
2596
|
+
var tmp2 = state.ub6_1;
|
|
2592
2597
|
// Inline function 'kotlin.collections.set' call
|
|
2593
|
-
var value_0 = state.
|
|
2598
|
+
var value_0 = state.fb7_1;
|
|
2594
2599
|
points.g3(tmp2, value_0);
|
|
2595
|
-
var focalIndex = state.
|
|
2596
|
-
if (state.
|
|
2597
|
-
var oppId = state.
|
|
2600
|
+
var focalIndex = state.vb6_1.o2(state.ub6_1);
|
|
2601
|
+
if (state.vb6_1.g1() > 1) {
|
|
2602
|
+
var oppId = state.vb6_1.h1((focalIndex + 1 | 0) % state.vb6_1.g1() | 0);
|
|
2598
2603
|
// Inline function 'kotlin.collections.set' call
|
|
2599
|
-
var value_1 = state.
|
|
2604
|
+
var value_1 = state.gb7_1;
|
|
2600
2605
|
points.g3(oppId, value_1);
|
|
2601
2606
|
}
|
|
2602
2607
|
var tmp;
|
|
2603
2608
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2604
|
-
if (!state.
|
|
2605
|
-
tmp = first(state.
|
|
2609
|
+
if (!state.yb6_1.r()) {
|
|
2610
|
+
tmp = first(state.yb6_1).r8k_1;
|
|
2606
2611
|
} else {
|
|
2607
|
-
tmp = state.
|
|
2612
|
+
tmp = state.ub6_1;
|
|
2608
2613
|
}
|
|
2609
2614
|
var leadPid = tmp;
|
|
2610
|
-
var rolloutState = new RolloutState(state.
|
|
2611
|
-
var result = $this.
|
|
2612
|
-
var total = coerceAtLeast(result.
|
|
2613
|
-
return result.
|
|
2615
|
+
var rolloutState = new RolloutState(state.vb6_1, hands, trump, currentTrick, state.hb7_1, points, state.pb7_1, state.ob7_1, state.ub6_1, leadPid);
|
|
2616
|
+
var result = $this.jbc_1.pbb(rolloutState);
|
|
2617
|
+
var total = coerceAtLeast(result.rbb_1 + result.sbb_1 | 0, 1.0);
|
|
2618
|
+
return result.rbb_1 / total;
|
|
2614
2619
|
}
|
|
2615
2620
|
function PimcEngine(beliefNetwork, rolloutPolicy, config, random) {
|
|
2616
2621
|
config = config === VOID ? new PimcConfig() : config;
|
|
2617
2622
|
random = random === VOID ? Default_getInstance() : random;
|
|
2618
|
-
this.
|
|
2619
|
-
this.
|
|
2620
|
-
this.
|
|
2621
|
-
this.
|
|
2622
|
-
this.
|
|
2623
|
-
this.
|
|
2624
|
-
this.
|
|
2625
|
-
}
|
|
2626
|
-
protoOf(PimcEngine).
|
|
2623
|
+
this.dbc_1 = beliefNetwork;
|
|
2624
|
+
this.ebc_1 = rolloutPolicy;
|
|
2625
|
+
this.fbc_1 = config;
|
|
2626
|
+
this.gbc_1 = random;
|
|
2627
|
+
this.hbc_1 = new WorldSampler(this.gbc_1);
|
|
2628
|
+
this.ibc_1 = this.fbc_1.bbc_1 > 0 ? new EndgameSolver() : null;
|
|
2629
|
+
this.jbc_1 = new DeterministicRollout(this.ebc_1, this.gbc_1, this.fbc_1.abc_1, this.ibc_1, this.fbc_1.bbc_1);
|
|
2630
|
+
}
|
|
2631
|
+
protoOf(PimcEngine).kbc = function (state, legalActions) {
|
|
2627
2632
|
if (legalActions.g1() <= 1) {
|
|
2628
2633
|
// Inline function 'kotlin.collections.associateWith' call
|
|
2629
2634
|
var result = LinkedHashMap_init_$Create$_0(coerceAtLeast_0(mapCapacity(collectionSizeOrDefault(legalActions, 10)), 16));
|
|
@@ -2657,7 +2662,7 @@
|
|
|
2657
2662
|
}
|
|
2658
2663
|
return result_0;
|
|
2659
2664
|
}
|
|
2660
|
-
var tmp0_elvis_lhs = state.
|
|
2665
|
+
var tmp0_elvis_lhs = state.zb6_1;
|
|
2661
2666
|
var tmp;
|
|
2662
2667
|
if (tmp0_elvis_lhs == null) {
|
|
2663
2668
|
// Inline function 'kotlin.collections.associateWith' call
|
|
@@ -2673,8 +2678,8 @@
|
|
|
2673
2678
|
tmp = tmp0_elvis_lhs;
|
|
2674
2679
|
}
|
|
2675
2680
|
var trump = tmp;
|
|
2676
|
-
var belief = this.
|
|
2677
|
-
var worlds = this.
|
|
2681
|
+
var belief = this.dbc_1.pb8(state);
|
|
2682
|
+
var worlds = this.hbc_1.mbc(state, belief, this.fbc_1.wbb_1);
|
|
2678
2683
|
// Inline function 'kotlin.collections.map' call
|
|
2679
2684
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2680
2685
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(worlds, 10));
|
|
@@ -2694,18 +2699,18 @@
|
|
|
2694
2699
|
destination_0.e1(destination_1);
|
|
2695
2700
|
}
|
|
2696
2701
|
var worldScores = destination_0;
|
|
2697
|
-
return MoveScoreAggregator_instance.
|
|
2702
|
+
return MoveScoreAggregator_instance.vbb(worldScores, this.fbc_1);
|
|
2698
2703
|
};
|
|
2699
2704
|
function SimCard(playerId, card) {
|
|
2700
|
-
this.
|
|
2701
|
-
this.
|
|
2705
|
+
this.dbb_1 = playerId;
|
|
2706
|
+
this.ebb_1 = card;
|
|
2702
2707
|
}
|
|
2703
2708
|
protoOf(SimCard).toString = function () {
|
|
2704
|
-
return 'SimCard(playerId=' + this.
|
|
2709
|
+
return 'SimCard(playerId=' + this.dbb_1 + ', card=' + this.ebb_1.toString() + ')';
|
|
2705
2710
|
};
|
|
2706
2711
|
protoOf(SimCard).hashCode = function () {
|
|
2707
|
-
var result = getStringHashCode(this.
|
|
2708
|
-
result = imul(result, 31) + this.
|
|
2712
|
+
var result = getStringHashCode(this.dbb_1);
|
|
2713
|
+
result = imul(result, 31) + this.ebb_1.hashCode() | 0;
|
|
2709
2714
|
return result;
|
|
2710
2715
|
};
|
|
2711
2716
|
protoOf(SimCard).equals = function (other) {
|
|
@@ -2713,22 +2718,22 @@
|
|
|
2713
2718
|
return true;
|
|
2714
2719
|
if (!(other instanceof SimCard))
|
|
2715
2720
|
return false;
|
|
2716
|
-
if (!(this.
|
|
2721
|
+
if (!(this.dbb_1 === other.dbb_1))
|
|
2717
2722
|
return false;
|
|
2718
|
-
if (!this.
|
|
2723
|
+
if (!this.ebb_1.equals(other.ebb_1))
|
|
2719
2724
|
return false;
|
|
2720
2725
|
return true;
|
|
2721
2726
|
};
|
|
2722
2727
|
function TrickResult(winnerId, points) {
|
|
2723
|
-
this.
|
|
2724
|
-
this.
|
|
2728
|
+
this.nbb_1 = winnerId;
|
|
2729
|
+
this.obb_1 = points;
|
|
2725
2730
|
}
|
|
2726
2731
|
protoOf(TrickResult).toString = function () {
|
|
2727
|
-
return 'TrickResult(winnerId=' + this.
|
|
2732
|
+
return 'TrickResult(winnerId=' + this.nbb_1 + ', points=' + this.obb_1 + ')';
|
|
2728
2733
|
};
|
|
2729
2734
|
protoOf(TrickResult).hashCode = function () {
|
|
2730
|
-
var result = getStringHashCode(this.
|
|
2731
|
-
result = imul(result, 31) + this.
|
|
2735
|
+
var result = getStringHashCode(this.nbb_1);
|
|
2736
|
+
result = imul(result, 31) + this.obb_1 | 0;
|
|
2732
2737
|
return result;
|
|
2733
2738
|
};
|
|
2734
2739
|
protoOf(TrickResult).equals = function (other) {
|
|
@@ -2736,9 +2741,9 @@
|
|
|
2736
2741
|
return true;
|
|
2737
2742
|
if (!(other instanceof TrickResult))
|
|
2738
2743
|
return false;
|
|
2739
|
-
if (!(this.
|
|
2744
|
+
if (!(this.nbb_1 === other.nbb_1))
|
|
2740
2745
|
return false;
|
|
2741
|
-
if (!(this.
|
|
2746
|
+
if (!(this.obb_1 === other.obb_1))
|
|
2742
2747
|
return false;
|
|
2743
2748
|
return true;
|
|
2744
2749
|
};
|
|
@@ -2766,14 +2771,14 @@
|
|
|
2766
2771
|
}
|
|
2767
2772
|
function TrickSimulator() {
|
|
2768
2773
|
}
|
|
2769
|
-
protoOf(TrickSimulator).
|
|
2774
|
+
protoOf(TrickSimulator).mbb = function (cards, trump) {
|
|
2770
2775
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2771
2776
|
// Inline function 'kotlin.require' call
|
|
2772
2777
|
if (!!cards.r()) {
|
|
2773
2778
|
var message = 'Cannot resolve an empty trick';
|
|
2774
2779
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2775
2780
|
}
|
|
2776
|
-
var firstSuit = first(cards).
|
|
2781
|
+
var firstSuit = first(cards).ebb_1.x6l();
|
|
2777
2782
|
var tmp$ret$3;
|
|
2778
2783
|
$l$block_0: {
|
|
2779
2784
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -2788,10 +2793,10 @@
|
|
|
2788
2793
|
break $l$block_0;
|
|
2789
2794
|
}
|
|
2790
2795
|
var it = maxElem;
|
|
2791
|
-
var maxValue = getGrowth(it.
|
|
2796
|
+
var maxValue = getGrowth(it.ebb_1, trump, firstSuit);
|
|
2792
2797
|
do {
|
|
2793
2798
|
var e = iterator.v();
|
|
2794
|
-
var v = getGrowth(e.
|
|
2799
|
+
var v = getGrowth(e.ebb_1, trump, firstSuit);
|
|
2795
2800
|
if (compareTo(maxValue, v) < 0) {
|
|
2796
2801
|
maxElem = e;
|
|
2797
2802
|
maxValue = v;
|
|
@@ -2807,17 +2812,17 @@
|
|
|
2807
2812
|
while (_iterator__ex2g4s.u()) {
|
|
2808
2813
|
var element = _iterator__ex2g4s.v();
|
|
2809
2814
|
var tmp = sum;
|
|
2810
|
-
sum = tmp + getPoint(element.
|
|
2815
|
+
sum = tmp + getPoint(element.ebb_1, trump) | 0;
|
|
2811
2816
|
}
|
|
2812
2817
|
var points = sum;
|
|
2813
|
-
return new TrickResult(winner.
|
|
2818
|
+
return new TrickResult(winner.dbb_1, points);
|
|
2814
2819
|
};
|
|
2815
|
-
protoOf(TrickSimulator).
|
|
2820
|
+
protoOf(TrickSimulator).gb9 = function (hand, trickCards, trump, rules, playersMode, playerId, partnerPlayerId) {
|
|
2816
2821
|
if (hand.r())
|
|
2817
2822
|
return emptyList();
|
|
2818
2823
|
if (trickCards.r())
|
|
2819
2824
|
return hand;
|
|
2820
|
-
var firstSuit = first(trickCards).
|
|
2825
|
+
var firstSuit = first(trickCards).ebb_1.x6l();
|
|
2821
2826
|
var tmp$ret$0;
|
|
2822
2827
|
$l$block_0: {
|
|
2823
2828
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -2912,7 +2917,7 @@
|
|
|
2912
2917
|
var _iterator__ex2g4s_3 = trickCards.t();
|
|
2913
2918
|
while (_iterator__ex2g4s_3.u()) {
|
|
2914
2919
|
var element_3 = _iterator__ex2g4s_3.v();
|
|
2915
|
-
if (element_3.
|
|
2920
|
+
if (element_3.ebb_1.x6l().equals(trump)) {
|
|
2916
2921
|
tmp$ret$10 = true;
|
|
2917
2922
|
break $l$block_4;
|
|
2918
2923
|
}
|
|
@@ -2952,10 +2957,10 @@
|
|
|
2952
2957
|
break $l$block_6;
|
|
2953
2958
|
}
|
|
2954
2959
|
var it = maxElem;
|
|
2955
|
-
var maxValue = getGrowth(it.
|
|
2960
|
+
var maxValue = getGrowth(it.ebb_1, trump, firstSuit);
|
|
2956
2961
|
do {
|
|
2957
2962
|
var e = iterator.v();
|
|
2958
|
-
var v = getGrowth(e.
|
|
2963
|
+
var v = getGrowth(e.ebb_1, trump, firstSuit);
|
|
2959
2964
|
if (compareTo(maxValue, v) < 0) {
|
|
2960
2965
|
maxElem = e;
|
|
2961
2966
|
maxValue = v;
|
|
@@ -2972,7 +2977,7 @@
|
|
|
2972
2977
|
tmp_4 = tmp1_elvis_lhs;
|
|
2973
2978
|
}
|
|
2974
2979
|
var winningCard = tmp_4;
|
|
2975
|
-
var isPartnerWinning = playersMode.isTeamGame && winningCard.
|
|
2980
|
+
var isPartnerWinning = playersMode.isTeamGame && winningCard.dbb_1 === partnerPlayerId;
|
|
2976
2981
|
if (isPartnerWinning) {
|
|
2977
2982
|
var tmp_5;
|
|
2978
2983
|
switch (rules.trumpCardStepPartnerMode.a1_1) {
|
|
@@ -2983,7 +2988,7 @@
|
|
|
2983
2988
|
tmp_5 = candidates;
|
|
2984
2989
|
break;
|
|
2985
2990
|
case 1:
|
|
2986
|
-
tmp_5 = filterHigherTrumpOrAll(this, candidates, winningCard.
|
|
2991
|
+
tmp_5 = filterHigherTrumpOrAll(this, candidates, winningCard.ebb_1, trump, firstSuit);
|
|
2987
2992
|
break;
|
|
2988
2993
|
default:
|
|
2989
2994
|
noWhenBranchMatchedException();
|
|
@@ -2991,7 +2996,7 @@
|
|
|
2991
2996
|
}
|
|
2992
2997
|
return tmp_5;
|
|
2993
2998
|
}
|
|
2994
|
-
return filterHigherTrumpOrAll(this, candidates, winningCard.
|
|
2999
|
+
return filterHigherTrumpOrAll(this, candidates, winningCard.ebb_1, trump, firstSuit);
|
|
2995
3000
|
};
|
|
2996
3001
|
var TrickSimulator_instance;
|
|
2997
3002
|
function TrickSimulator_getInstance() {
|
|
@@ -3003,7 +3008,7 @@
|
|
|
3003
3008
|
var _iterator__ex2g4s = get_entries().t();
|
|
3004
3009
|
while (_iterator__ex2g4s.u()) {
|
|
3005
3010
|
var suit = _iterator__ex2g4s.v();
|
|
3006
|
-
var _iterator__ex2g4s_0 = $this.
|
|
3011
|
+
var _iterator__ex2g4s_0 = $this.pbc_1.t();
|
|
3007
3012
|
while (_iterator__ex2g4s_0.u()) {
|
|
3008
3013
|
var name = _iterator__ex2g4s_0.v();
|
|
3009
3014
|
var idx = imul(suit.a1_1, 8) + name.a1_1 | 0;
|
|
@@ -3032,7 +3037,7 @@
|
|
|
3032
3037
|
var currentSizes = new Int32Array(opponents.g1());
|
|
3033
3038
|
var assigned = booleanArray(32);
|
|
3034
3039
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
3035
|
-
var this_0 = get_indices_0(belief.
|
|
3040
|
+
var this_0 = get_indices_0(belief.ub8_1);
|
|
3036
3041
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
3037
3042
|
var tmp = WorldSampler$sampleOneWorld$lambda($this, belief);
|
|
3038
3043
|
var tmp$ret$4 = new sam$kotlin_Comparator$0_1(tmp);
|
|
@@ -3040,8 +3045,8 @@
|
|
|
3040
3045
|
var _iterator__ex2g4s_0 = sortedHiddenIndices.t();
|
|
3041
3046
|
$l$loop: while (_iterator__ex2g4s_0.u()) {
|
|
3042
3047
|
var rowIdx = _iterator__ex2g4s_0.v();
|
|
3043
|
-
var cardIdx = belief.
|
|
3044
|
-
var probs = belief.
|
|
3048
|
+
var cardIdx = belief.ub8_1[rowIdx];
|
|
3049
|
+
var probs = belief.tb8_1[rowIdx];
|
|
3045
3050
|
var tmp0_elvis_lhs = allCards[cardIdx];
|
|
3046
3051
|
var tmp_0;
|
|
3047
3052
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -3100,12 +3105,12 @@
|
|
|
3100
3105
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3101
3106
|
var candidates = ArrayList_init_$Create$();
|
|
3102
3107
|
var inductionVariable = 0;
|
|
3103
|
-
var last = belief.
|
|
3108
|
+
var last = belief.ub8_1.length - 1 | 0;
|
|
3104
3109
|
if (inductionVariable <= last)
|
|
3105
3110
|
$l$loop: do {
|
|
3106
3111
|
var rowIdx = inductionVariable;
|
|
3107
3112
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3108
|
-
var cardIdx = belief.
|
|
3113
|
+
var cardIdx = belief.ub8_1[rowIdx];
|
|
3109
3114
|
var tmp0_elvis_lhs = allCards[cardIdx];
|
|
3110
3115
|
var tmp;
|
|
3111
3116
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -3118,7 +3123,7 @@
|
|
|
3118
3123
|
if (voids.m2(card.x6l())) {
|
|
3119
3124
|
tmp_0 = 0.0;
|
|
3120
3125
|
} else {
|
|
3121
|
-
tmp_0 = coerceAtLeast(belief.
|
|
3126
|
+
tmp_0 = coerceAtLeast(belief.tb8_1[rowIdx][0], 1.0E-6);
|
|
3122
3127
|
}
|
|
3123
3128
|
var weight = tmp_0;
|
|
3124
3129
|
candidates.e1(new Triple(rowIdx, card, weight));
|
|
@@ -3147,7 +3152,7 @@
|
|
|
3147
3152
|
hand.e1(candidates.e3(0).un_1);
|
|
3148
3153
|
continue $l$loop_1;
|
|
3149
3154
|
}
|
|
3150
|
-
var r = $this.
|
|
3155
|
+
var r = $this.lbc_1.bj() * totalWeight;
|
|
3151
3156
|
var selectedIdx = get_lastIndex(candidates);
|
|
3152
3157
|
var inductionVariable_0 = 0;
|
|
3153
3158
|
var last_0 = candidates.g1() - 1 | 0;
|
|
@@ -3167,7 +3172,7 @@
|
|
|
3167
3172
|
return new SampledWorld(mapOf(to(opponent, hand)));
|
|
3168
3173
|
}
|
|
3169
3174
|
function sampleFromDistribution($this, probs) {
|
|
3170
|
-
var r = $this.
|
|
3175
|
+
var r = $this.lbc_1.cj();
|
|
3171
3176
|
var cumulative = 0.0;
|
|
3172
3177
|
var inductionVariable = 0;
|
|
3173
3178
|
var last = probs.length - 1 | 0;
|
|
@@ -3197,9 +3202,9 @@
|
|
|
3197
3202
|
}
|
|
3198
3203
|
function Companion_4() {
|
|
3199
3204
|
Companion_instance_6 = this;
|
|
3200
|
-
this.
|
|
3201
|
-
this.
|
|
3202
|
-
this.
|
|
3205
|
+
this.nbc_1 = 100;
|
|
3206
|
+
this.obc_1 = 1.0E-6;
|
|
3207
|
+
this.pbc_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
3208
|
}
|
|
3204
3209
|
var Companion_instance_6;
|
|
3205
3210
|
function Companion_getInstance_4() {
|
|
@@ -3208,16 +3213,16 @@
|
|
|
3208
3213
|
return Companion_instance_6;
|
|
3209
3214
|
}
|
|
3210
3215
|
function sam$kotlin_Comparator$0_1(function_0) {
|
|
3211
|
-
this.
|
|
3216
|
+
this.qbc_1 = function_0;
|
|
3212
3217
|
}
|
|
3213
3218
|
protoOf(sam$kotlin_Comparator$0_1).hd = function (a, b) {
|
|
3214
|
-
return this.
|
|
3219
|
+
return this.qbc_1(a, b);
|
|
3215
3220
|
};
|
|
3216
3221
|
protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {
|
|
3217
3222
|
return this.hd(a, b);
|
|
3218
3223
|
};
|
|
3219
3224
|
protoOf(sam$kotlin_Comparator$0_1).s3 = function () {
|
|
3220
|
-
return this.
|
|
3225
|
+
return this.qbc_1;
|
|
3221
3226
|
};
|
|
3222
3227
|
protoOf(sam$kotlin_Comparator$0_1).equals = function (other) {
|
|
3223
3228
|
var tmp;
|
|
@@ -3240,18 +3245,18 @@
|
|
|
3240
3245
|
function WorldSampler$sampleOneWorld$lambda(this$0, $belief) {
|
|
3241
3246
|
return function (a, b) {
|
|
3242
3247
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
3243
|
-
var tmp = entropy(this$0, $belief.
|
|
3244
|
-
var tmp$ret$1 = entropy(this$0, $belief.
|
|
3248
|
+
var tmp = entropy(this$0, $belief.tb8_1[a]);
|
|
3249
|
+
var tmp$ret$1 = entropy(this$0, $belief.tb8_1[b]);
|
|
3245
3250
|
return compareValues(tmp, tmp$ret$1);
|
|
3246
3251
|
};
|
|
3247
3252
|
}
|
|
3248
3253
|
function WorldSampler(random) {
|
|
3249
3254
|
Companion_getInstance_4();
|
|
3250
|
-
this.
|
|
3255
|
+
this.lbc_1 = random;
|
|
3251
3256
|
}
|
|
3252
|
-
protoOf(WorldSampler).
|
|
3253
|
-
var focalIndex = state.
|
|
3254
|
-
var n = state.
|
|
3257
|
+
protoOf(WorldSampler).mbc = function (state, belief, worldCount) {
|
|
3258
|
+
var focalIndex = state.vb6_1.o2(state.ub6_1);
|
|
3259
|
+
var n = state.vb6_1.g1();
|
|
3255
3260
|
// Inline function 'kotlin.collections.map' call
|
|
3256
3261
|
var this_0 = until(1, n);
|
|
3257
3262
|
// Inline function 'kotlin.collections.mapTo' call
|
|
@@ -3263,7 +3268,7 @@
|
|
|
3263
3268
|
var item = inductionVariable;
|
|
3264
3269
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3265
3270
|
var absIdx = (focalIndex + item | 0) % n | 0;
|
|
3266
|
-
var tmp$ret$0 = state.
|
|
3271
|
+
var tmp$ret$0 = state.vb6_1.h1(absIdx);
|
|
3267
3272
|
destination.e1(tmp$ret$0);
|
|
3268
3273
|
}
|
|
3269
3274
|
while (!(item === last));
|
|
@@ -3274,9 +3279,9 @@
|
|
|
3274
3279
|
var _iterator__ex2g4s = opponents.t();
|
|
3275
3280
|
while (_iterator__ex2g4s.u()) {
|
|
3276
3281
|
var item_0 = _iterator__ex2g4s.v();
|
|
3277
|
-
var tmp0_elvis_lhs = state.
|
|
3282
|
+
var tmp0_elvis_lhs = state.xb6_1.v2(item_0);
|
|
3278
3283
|
var played = (tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs).g1();
|
|
3279
|
-
var tmp0 = state.
|
|
3284
|
+
var tmp0 = state.yb6_1;
|
|
3280
3285
|
var tmp$ret$3;
|
|
3281
3286
|
$l$block: {
|
|
3282
3287
|
// Inline function 'kotlin.collections.count' call
|
|
@@ -3294,7 +3299,7 @@
|
|
|
3294
3299
|
var _iterator__ex2g4s_0 = tmp0.t();
|
|
3295
3300
|
while (_iterator__ex2g4s_0.u()) {
|
|
3296
3301
|
var element = _iterator__ex2g4s_0.v();
|
|
3297
|
-
if (element.
|
|
3302
|
+
if (element.r8k_1 === item_0) {
|
|
3298
3303
|
count = count + 1 | 0;
|
|
3299
3304
|
checkCountOverflow(count);
|
|
3300
3305
|
}
|
|
@@ -3302,7 +3307,7 @@
|
|
|
3302
3307
|
tmp$ret$3 = count;
|
|
3303
3308
|
}
|
|
3304
3309
|
var onTable = tmp$ret$3;
|
|
3305
|
-
var tmp$ret$5 = coerceAtLeast_0((state.
|
|
3310
|
+
var tmp$ret$5 = coerceAtLeast_0((state.qb7_1 - played | 0) - onTable | 0, 0);
|
|
3306
3311
|
destination_0.e1(tmp$ret$5);
|
|
3307
3312
|
}
|
|
3308
3313
|
var handSizes = destination_0;
|
|
@@ -3313,7 +3318,7 @@
|
|
|
3313
3318
|
var _iterator__ex2g4s_1 = opponents.t();
|
|
3314
3319
|
while (_iterator__ex2g4s_1.u()) {
|
|
3315
3320
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
3316
|
-
var tmp0_elvis_lhs_0 = state.
|
|
3321
|
+
var tmp0_elvis_lhs_0 = state.kb7_1.v2(item_1);
|
|
3317
3322
|
var tmp$ret$8 = tmp0_elvis_lhs_0 == null ? emptySet() : tmp0_elvis_lhs_0;
|
|
3318
3323
|
destination_1.e1(tmp$ret$8);
|
|
3319
3324
|
}
|
|
@@ -3334,20 +3339,20 @@
|
|
|
3334
3339
|
return list;
|
|
3335
3340
|
};
|
|
3336
3341
|
function SampledWorld(hands) {
|
|
3337
|
-
this.
|
|
3342
|
+
this.cbc_1 = hands;
|
|
3338
3343
|
}
|
|
3339
3344
|
protoOf(SampledWorld).toString = function () {
|
|
3340
|
-
return 'SampledWorld(hands=' + toString_0(this.
|
|
3345
|
+
return 'SampledWorld(hands=' + toString_0(this.cbc_1) + ')';
|
|
3341
3346
|
};
|
|
3342
3347
|
protoOf(SampledWorld).hashCode = function () {
|
|
3343
|
-
return hashCode(this.
|
|
3348
|
+
return hashCode(this.cbc_1);
|
|
3344
3349
|
};
|
|
3345
3350
|
protoOf(SampledWorld).equals = function (other) {
|
|
3346
3351
|
if (this === other)
|
|
3347
3352
|
return true;
|
|
3348
3353
|
if (!(other instanceof SampledWorld))
|
|
3349
3354
|
return false;
|
|
3350
|
-
if (!equals(this.
|
|
3355
|
+
if (!equals(this.cbc_1, other.cbc_1))
|
|
3351
3356
|
return false;
|
|
3352
3357
|
return true;
|
|
3353
3358
|
};
|
|
@@ -3361,7 +3366,7 @@
|
|
|
3361
3366
|
var _iterator__ex2g4s = get_entries().t();
|
|
3362
3367
|
while (_iterator__ex2g4s.u()) {
|
|
3363
3368
|
var suit = _iterator__ex2g4s.v();
|
|
3364
|
-
var _iterator__ex2g4s_0 = Companion_getInstance_5().
|
|
3369
|
+
var _iterator__ex2g4s_0 = Companion_getInstance_5().vbc_1.t();
|
|
3365
3370
|
while (_iterator__ex2g4s_0.u()) {
|
|
3366
3371
|
var name = _iterator__ex2g4s_0.v();
|
|
3367
3372
|
cards.e1(Companion_instance_0.a6m(suit, name));
|
|
@@ -3382,7 +3387,7 @@
|
|
|
3382
3387
|
if (hand.r())
|
|
3383
3388
|
return focalPoints;
|
|
3384
3389
|
var partnerPid = getPartnerPid($this, playerId, playOrder, playersMode);
|
|
3385
|
-
var legalCards = TrickSimulator_instance.
|
|
3390
|
+
var legalCards = TrickSimulator_instance.gb9(hand, trick, trump, rules, playersMode, playerId, partnerPid);
|
|
3386
3391
|
if (legalCards.r())
|
|
3387
3392
|
return focalPoints;
|
|
3388
3393
|
var moves = legalCards === hand ? ArrayList_init_$Create$_1(legalCards) : legalCards;
|
|
@@ -3397,17 +3402,17 @@
|
|
|
3397
3402
|
trick.e1(new SimCard(playerId, card));
|
|
3398
3403
|
var tmp_0;
|
|
3399
3404
|
if (trick.g1() >= playOrder.g1()) {
|
|
3400
|
-
var trickResult = TrickSimulator_instance.
|
|
3405
|
+
var trickResult = TrickSimulator_instance.mbb(trick, trump);
|
|
3401
3406
|
var tmp_1;
|
|
3402
|
-
if (focalTeam.m2(trickResult.
|
|
3403
|
-
tmp_1 = focalPoints + trickResult.
|
|
3407
|
+
if (focalTeam.m2(trickResult.nbb_1)) {
|
|
3408
|
+
tmp_1 = focalPoints + trickResult.obb_1 | 0;
|
|
3404
3409
|
} else {
|
|
3405
3410
|
tmp_1 = focalPoints;
|
|
3406
3411
|
}
|
|
3407
3412
|
var newFocalPts = tmp_1;
|
|
3408
3413
|
var tmp_2;
|
|
3409
|
-
if (!focalTeam.m2(trickResult.
|
|
3410
|
-
tmp_2 = oppPoints + trickResult.
|
|
3414
|
+
if (!focalTeam.m2(trickResult.nbb_1)) {
|
|
3415
|
+
tmp_2 = oppPoints + trickResult.obb_1 | 0;
|
|
3411
3416
|
} else {
|
|
3412
3417
|
tmp_2 = oppPoints;
|
|
3413
3418
|
}
|
|
@@ -3439,7 +3444,7 @@
|
|
|
3439
3444
|
}
|
|
3440
3445
|
if (tmp$ret$0) {
|
|
3441
3446
|
var tmp_5;
|
|
3442
|
-
if (focalTeam.m2(trickResult.
|
|
3447
|
+
if (focalTeam.m2(trickResult.nbb_1)) {
|
|
3443
3448
|
tmp_5 = newFocalPts + 10 | 0;
|
|
3444
3449
|
} else {
|
|
3445
3450
|
tmp_5 = newFocalPts;
|
|
@@ -3448,7 +3453,7 @@
|
|
|
3448
3453
|
} else {
|
|
3449
3454
|
var savedTrick = ArrayList_init_$Create$_1(trick);
|
|
3450
3455
|
trick.b3();
|
|
3451
|
-
var newOrder = getPlayOrder($this, playOrder, trickResult.
|
|
3456
|
+
var newOrder = getPlayOrder($this, playOrder, trickResult.nbb_1);
|
|
3452
3457
|
var s = endgameMinimax($this, hands, trick, newOrder, 0, trump, focalTeam, newFocalPts, newOppPts, rules, playersMode, a, b);
|
|
3453
3458
|
trick.b3();
|
|
3454
3459
|
trick.i1(savedTrick);
|
|
@@ -3482,12 +3487,12 @@
|
|
|
3482
3487
|
return bestScore;
|
|
3483
3488
|
}
|
|
3484
3489
|
function computeFocalTeam($this, state) {
|
|
3485
|
-
if (state.
|
|
3486
|
-
var focalIndex = state.
|
|
3490
|
+
if (state.xba_1.isTeamGame && state.rba_1.g1() === 4) {
|
|
3491
|
+
var focalIndex = state.rba_1.o2(state.zba_1);
|
|
3487
3492
|
var partnerIndex = (focalIndex + 2 | 0) % 4 | 0;
|
|
3488
|
-
return setOf_0([state.
|
|
3493
|
+
return setOf_0([state.zba_1, state.rba_1.h1(partnerIndex)]);
|
|
3489
3494
|
}
|
|
3490
|
-
return setOf(state.
|
|
3495
|
+
return setOf(state.zba_1);
|
|
3491
3496
|
}
|
|
3492
3497
|
function getPlayOrder($this, playerOrder, leadId) {
|
|
3493
3498
|
var startIdx = coerceAtLeast_0(playerOrder.o2(leadId), 0);
|
|
@@ -3517,13 +3522,13 @@
|
|
|
3517
3522
|
}
|
|
3518
3523
|
function Companion_5() {
|
|
3519
3524
|
Companion_instance_7 = this;
|
|
3520
|
-
this.
|
|
3521
|
-
this.
|
|
3522
|
-
this.
|
|
3523
|
-
this.
|
|
3524
|
-
this.
|
|
3525
|
+
this.rbc_1 = 4;
|
|
3526
|
+
this.sbc_1 = 10;
|
|
3527
|
+
this.tbc_1 = 5;
|
|
3528
|
+
this.ubc_1 = 5000;
|
|
3529
|
+
this.vbc_1 = take(get_entries_0(), 8);
|
|
3525
3530
|
var tmp = this;
|
|
3526
|
-
tmp.
|
|
3531
|
+
tmp.wbc_1 = lazy(EndgameSolver$Companion$ALL_CARDS$delegate$lambda);
|
|
3527
3532
|
}
|
|
3528
3533
|
var Companion_instance_7;
|
|
3529
3534
|
function Companion_getInstance_5() {
|
|
@@ -3534,11 +3539,11 @@
|
|
|
3534
3539
|
function EndgameSolver() {
|
|
3535
3540
|
Companion_getInstance_5();
|
|
3536
3541
|
}
|
|
3537
|
-
protoOf(EndgameSolver).
|
|
3542
|
+
protoOf(EndgameSolver).qbb = function (state, threshold) {
|
|
3538
3543
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
3539
|
-
if (!state.
|
|
3544
|
+
if (!state.uba_1.r())
|
|
3540
3545
|
return null;
|
|
3541
|
-
var tmp0 = state.
|
|
3546
|
+
var tmp0 = state.sba_1.x2();
|
|
3542
3547
|
var tmp$ret$1;
|
|
3543
3548
|
$l$block: {
|
|
3544
3549
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -3566,7 +3571,7 @@
|
|
|
3566
3571
|
var maxCards = tmp;
|
|
3567
3572
|
if (maxCards > threshold || maxCards === 0)
|
|
3568
3573
|
return null;
|
|
3569
|
-
var tmp0_0 = state.
|
|
3574
|
+
var tmp0_0 = state.sba_1.x2();
|
|
3570
3575
|
var tmp$ret$4;
|
|
3571
3576
|
$l$block_1: {
|
|
3572
3577
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -3599,12 +3604,12 @@
|
|
|
3599
3604
|
while (_iterator__ex2g4s_0.u()) {
|
|
3600
3605
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
3601
3606
|
var tmp_1 = sum;
|
|
3602
|
-
var tmp0_elvis_lhs_0 = state.
|
|
3607
|
+
var tmp0_elvis_lhs_0 = state.wba_1.v2(element_0);
|
|
3603
3608
|
sum = tmp_1 + (tmp0_elvis_lhs_0 == null ? 0 : tmp0_elvis_lhs_0) | 0;
|
|
3604
3609
|
}
|
|
3605
3610
|
var focalPts = sum;
|
|
3606
3611
|
// Inline function 'kotlin.collections.filter' call
|
|
3607
|
-
var tmp0_1 = state.
|
|
3612
|
+
var tmp0_1 = state.rba_1;
|
|
3608
3613
|
// Inline function 'kotlin.collections.filterTo' call
|
|
3609
3614
|
var destination = ArrayList_init_$Create$();
|
|
3610
3615
|
var _iterator__ex2g4s_1 = tmp0_1.t();
|
|
@@ -3620,22 +3625,22 @@
|
|
|
3620
3625
|
while (_iterator__ex2g4s_2.u()) {
|
|
3621
3626
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
3622
3627
|
var tmp_2 = sum_0;
|
|
3623
|
-
var tmp0_elvis_lhs_1 = state.
|
|
3628
|
+
var tmp0_elvis_lhs_1 = state.wba_1.v2(element_2);
|
|
3624
3629
|
sum_0 = tmp_2 + (tmp0_elvis_lhs_1 == null ? 0 : tmp0_elvis_lhs_1) | 0;
|
|
3625
3630
|
}
|
|
3626
3631
|
var oppPts = sum_0;
|
|
3627
3632
|
// Inline function 'kotlin.collections.sumOf' call
|
|
3628
3633
|
var sum_1 = 0;
|
|
3629
|
-
var _iterator__ex2g4s_3 = flatten(state.
|
|
3634
|
+
var _iterator__ex2g4s_3 = flatten(state.sba_1.x2()).t();
|
|
3630
3635
|
while (_iterator__ex2g4s_3.u()) {
|
|
3631
3636
|
var element_3 = _iterator__ex2g4s_3.v();
|
|
3632
3637
|
var tmp_3 = sum_1;
|
|
3633
|
-
sum_1 = tmp_3 + getPoint(element_3, state.
|
|
3638
|
+
sum_1 = tmp_3 + getPoint(element_3, state.tba_1) | 0;
|
|
3634
3639
|
}
|
|
3635
3640
|
var remainingCardPoints = sum_1;
|
|
3636
|
-
var playOrder = getPlayOrder(this, state.
|
|
3641
|
+
var playOrder = getPlayOrder(this, state.rba_1, state.abb_1);
|
|
3637
3642
|
// Inline function 'kotlin.collections.mapValues' call
|
|
3638
|
-
var this_0 = state.
|
|
3643
|
+
var this_0 = state.sba_1;
|
|
3639
3644
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
3640
3645
|
var destination_0 = LinkedHashMap_init_$Create$_0(mapCapacity(this_0.g1()));
|
|
3641
3646
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -3649,12 +3654,12 @@
|
|
|
3649
3654
|
var tmp_5 = toMutableMap(destination_0);
|
|
3650
3655
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3651
3656
|
var tmp$ret$20 = ArrayList_init_$Create$();
|
|
3652
|
-
var focalFinalPoints = endgameMinimax(this, tmp_5, tmp$ret$20, playOrder, 0, state.
|
|
3657
|
+
var focalFinalPoints = endgameMinimax(this, tmp_5, tmp$ret$20, playOrder, 0, state.tba_1, focalTeam, focalPts, oppPts, state.yba_1, state.xba_1, -2147483648, 2147483647);
|
|
3653
3658
|
var totalPoints = ((focalPts + oppPts | 0) + remainingCardPoints | 0) + 10 | 0;
|
|
3654
3659
|
return new RolloutResult(focalFinalPoints, totalPoints - focalFinalPoints | 0);
|
|
3655
3660
|
};
|
|
3656
3661
|
function selectCard($this, state, legalActions) {
|
|
3657
|
-
var tmp0_elvis_lhs = state.
|
|
3662
|
+
var tmp0_elvis_lhs = state.zb6_1;
|
|
3658
3663
|
var tmp;
|
|
3659
3664
|
if (tmp0_elvis_lhs == null) {
|
|
3660
3665
|
return first(legalActions);
|
|
@@ -3678,52 +3683,52 @@
|
|
|
3678
3683
|
var _iterator__ex2g4s_0 = destination.t();
|
|
3679
3684
|
while (_iterator__ex2g4s_0.u()) {
|
|
3680
3685
|
var item = _iterator__ex2g4s_0.v();
|
|
3681
|
-
var tmp$ret$2 = item.
|
|
3686
|
+
var tmp$ret$2 = item.qb6_1;
|
|
3682
3687
|
destination_0.e1(tmp$ret$2);
|
|
3683
3688
|
}
|
|
3684
3689
|
var legalCards = destination_0;
|
|
3685
3690
|
if (legalCards.r())
|
|
3686
3691
|
return first(legalActions);
|
|
3687
3692
|
// Inline function 'kotlin.collections.map' call
|
|
3688
|
-
var this_0 = state.
|
|
3693
|
+
var this_0 = state.yb6_1;
|
|
3689
3694
|
// Inline function 'kotlin.collections.mapTo' call
|
|
3690
3695
|
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
3691
3696
|
var _iterator__ex2g4s_1 = this_0.t();
|
|
3692
3697
|
while (_iterator__ex2g4s_1.u()) {
|
|
3693
3698
|
var item_0 = _iterator__ex2g4s_1.v();
|
|
3694
|
-
var tmp$ret$5 = new SimCard(item_0.
|
|
3699
|
+
var tmp$ret$5 = new SimCard(item_0.r8k_1, item_0.t8k_1);
|
|
3695
3700
|
destination_1.e1(tmp$ret$5);
|
|
3696
3701
|
}
|
|
3697
3702
|
var trickCards = destination_1;
|
|
3698
|
-
var focalIndex = state.
|
|
3703
|
+
var focalIndex = state.vb6_1.o2(state.ub6_1);
|
|
3699
3704
|
var tmp_0;
|
|
3700
|
-
if (state.
|
|
3701
|
-
tmp_0 = state.
|
|
3705
|
+
if (state.pb7_1.isTeamGame && state.vb6_1.g1() === 4) {
|
|
3706
|
+
tmp_0 = state.vb6_1.h1((focalIndex + 2 | 0) % 4 | 0);
|
|
3702
3707
|
} else {
|
|
3703
3708
|
tmp_0 = null;
|
|
3704
3709
|
}
|
|
3705
3710
|
var partnerPid = tmp_0;
|
|
3706
3711
|
var partnerWinning = isPartnerWinning_0($this, trickCards, partnerPid, trump);
|
|
3707
|
-
var tmp_1 = flatten(state.
|
|
3712
|
+
var tmp_1 = flatten(state.xb6_1.x2());
|
|
3708
3713
|
// Inline function 'kotlin.collections.map' call
|
|
3709
|
-
var this_1 = state.
|
|
3714
|
+
var this_1 = state.yb6_1;
|
|
3710
3715
|
// Inline function 'kotlin.collections.mapTo' call
|
|
3711
3716
|
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
3712
3717
|
var _iterator__ex2g4s_2 = this_1.t();
|
|
3713
3718
|
while (_iterator__ex2g4s_2.u()) {
|
|
3714
3719
|
var item_1 = _iterator__ex2g4s_2.v();
|
|
3715
|
-
var tmp$ret$8 = item_1.
|
|
3720
|
+
var tmp$ret$8 = item_1.t8k_1;
|
|
3716
3721
|
destination_2.e1(tmp$ret$8);
|
|
3717
3722
|
}
|
|
3718
3723
|
var released = plus_0(tmp_1, destination_2);
|
|
3719
3724
|
// Inline function 'kotlin.collections.filter' call
|
|
3720
|
-
var tmp0 = state.
|
|
3725
|
+
var tmp0 = state.kb7_1.m1();
|
|
3721
3726
|
// Inline function 'kotlin.collections.filterTo' call
|
|
3722
3727
|
var destination_3 = ArrayList_init_$Create$();
|
|
3723
3728
|
var _iterator__ex2g4s_3 = tmp0.t();
|
|
3724
3729
|
while (_iterator__ex2g4s_3.u()) {
|
|
3725
3730
|
var element_0 = _iterator__ex2g4s_3.v();
|
|
3726
|
-
if (!(element_0.n1() === state.
|
|
3731
|
+
if (!(element_0.n1() === state.ub6_1)) {
|
|
3727
3732
|
destination_3.e1(element_0);
|
|
3728
3733
|
}
|
|
3729
3734
|
}
|
|
@@ -3737,13 +3742,13 @@
|
|
|
3737
3742
|
addAll(destination_4, list);
|
|
3738
3743
|
}
|
|
3739
3744
|
var oppVoids = toSet(destination_4);
|
|
3740
|
-
var card = $this.
|
|
3745
|
+
var card = $this.xbc_1.lbb(state.wb6_1, legalCards, trickCards, trump, partnerPid, partnerWinning, VOID, released, oppVoids);
|
|
3741
3746
|
return new PlayCard(card);
|
|
3742
3747
|
}
|
|
3743
3748
|
function isPartnerWinning_0($this, trickCards, partnerPid, trump) {
|
|
3744
3749
|
if (partnerPid == null || trickCards.r())
|
|
3745
3750
|
return false;
|
|
3746
|
-
var firstSuit = first(trickCards).
|
|
3751
|
+
var firstSuit = first(trickCards).ebb_1.x6l();
|
|
3747
3752
|
var tmp$ret$0;
|
|
3748
3753
|
$l$block_0: {
|
|
3749
3754
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -3758,10 +3763,10 @@
|
|
|
3758
3763
|
break $l$block_0;
|
|
3759
3764
|
}
|
|
3760
3765
|
var it = maxElem;
|
|
3761
|
-
var maxValue = getGrowth(it.
|
|
3766
|
+
var maxValue = getGrowth(it.ebb_1, trump, firstSuit);
|
|
3762
3767
|
do {
|
|
3763
3768
|
var e = iterator.v();
|
|
3764
|
-
var v = getGrowth(e.
|
|
3769
|
+
var v = getGrowth(e.ebb_1, trump, firstSuit);
|
|
3765
3770
|
if (compareTo(maxValue, v) < 0) {
|
|
3766
3771
|
maxElem = e;
|
|
3767
3772
|
maxValue = v;
|
|
@@ -3771,15 +3776,15 @@
|
|
|
3771
3776
|
tmp$ret$0 = maxElem;
|
|
3772
3777
|
}
|
|
3773
3778
|
var winner = tmp$ret$0;
|
|
3774
|
-
return (winner == null ? null : winner.
|
|
3779
|
+
return (winner == null ? null : winner.dbb_1) == partnerPid;
|
|
3775
3780
|
}
|
|
3776
3781
|
function HeuristicBotPolicy(circle1Threshold, circle2Threshold) {
|
|
3777
3782
|
circle1Threshold = circle1Threshold === VOID ? null : circle1Threshold;
|
|
3778
3783
|
circle2Threshold = circle2Threshold === VOID ? null : circle2Threshold;
|
|
3779
|
-
this.
|
|
3780
|
-
this.
|
|
3784
|
+
this.xbc_1 = new RolloutPolicy();
|
|
3785
|
+
this.ybc_1 = new SuitSelectionPolicy(VOID, circle1Threshold, circle2Threshold);
|
|
3781
3786
|
}
|
|
3782
|
-
protoOf(HeuristicBotPolicy).
|
|
3787
|
+
protoOf(HeuristicBotPolicy).lb9 = function (state, legalActions) {
|
|
3783
3788
|
if (legalActions.g1() === 1)
|
|
3784
3789
|
return first(legalActions);
|
|
3785
3790
|
var tmp;
|
|
@@ -3833,7 +3838,7 @@
|
|
|
3833
3838
|
tmp$ret$2 = false;
|
|
3834
3839
|
}
|
|
3835
3840
|
if (tmp$ret$2) {
|
|
3836
|
-
tmp = this.
|
|
3841
|
+
tmp = this.ybc_1.cbd(state, legalActions);
|
|
3837
3842
|
} else {
|
|
3838
3843
|
var tmp$ret$4;
|
|
3839
3844
|
$l$block_4: {
|
|
@@ -3867,7 +3872,7 @@
|
|
|
3867
3872
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
3868
3873
|
var tmp_3;
|
|
3869
3874
|
if (element_2 instanceof AcceptCombinations) {
|
|
3870
|
-
tmp_3 = element_2.
|
|
3875
|
+
tmp_3 = element_2.tb6_1;
|
|
3871
3876
|
} else {
|
|
3872
3877
|
tmp_3 = false;
|
|
3873
3878
|
}
|
|
@@ -3897,10 +3902,10 @@
|
|
|
3897
3902
|
return PimcBotPolicy_init_$Init$(pimcEngine, circle1Threshold, circle2Threshold, objectCreate(protoOf(PimcBotPolicy)));
|
|
3898
3903
|
}
|
|
3899
3904
|
function PimcBotPolicy(pimcEngine, suitSelectionPolicy) {
|
|
3900
|
-
this.
|
|
3901
|
-
this.
|
|
3905
|
+
this.dbd_1 = pimcEngine;
|
|
3906
|
+
this.ebd_1 = suitSelectionPolicy;
|
|
3902
3907
|
}
|
|
3903
|
-
protoOf(PimcBotPolicy).
|
|
3908
|
+
protoOf(PimcBotPolicy).lb9 = function (state, legalActions) {
|
|
3904
3909
|
if (legalActions.g1() === 1)
|
|
3905
3910
|
return first(legalActions);
|
|
3906
3911
|
var tmp;
|
|
@@ -3928,7 +3933,7 @@
|
|
|
3928
3933
|
tmp$ret$0 = false;
|
|
3929
3934
|
}
|
|
3930
3935
|
if (tmp$ret$0) {
|
|
3931
|
-
var scores = this.
|
|
3936
|
+
var scores = this.dbd_1.kbc(state, legalActions);
|
|
3932
3937
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
3933
3938
|
var tmp0 = scores.m1();
|
|
3934
3939
|
var tmp$ret$2;
|
|
@@ -3984,7 +3989,7 @@
|
|
|
3984
3989
|
tmp$ret$6 = false;
|
|
3985
3990
|
}
|
|
3986
3991
|
if (tmp$ret$6) {
|
|
3987
|
-
tmp = this.
|
|
3992
|
+
tmp = this.ebd_1.cbd(state, legalActions);
|
|
3988
3993
|
} else {
|
|
3989
3994
|
var tmp$ret$8;
|
|
3990
3995
|
$l$block_6: {
|
|
@@ -4018,7 +4023,7 @@
|
|
|
4018
4023
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
4019
4024
|
var tmp_3;
|
|
4020
4025
|
if (element_2 instanceof AcceptCombinations) {
|
|
4021
|
-
tmp_3 = element_2.
|
|
4026
|
+
tmp_3 = element_2.tb6_1;
|
|
4022
4027
|
} else {
|
|
4023
4028
|
tmp_3 = false;
|
|
4024
4029
|
}
|
|
@@ -4298,7 +4303,7 @@
|
|
|
4298
4303
|
var _iterator__ex2g4s = legalCards.t();
|
|
4299
4304
|
while (_iterator__ex2g4s.u()) {
|
|
4300
4305
|
var element = _iterator__ex2g4s.v();
|
|
4301
|
-
if (!element.x6l().equals(trump) && Companion_getInstance_6().
|
|
4306
|
+
if (!element.x6l().equals(trump) && Companion_getInstance_6().ibd_1.m2(element.m())) {
|
|
4302
4307
|
destination.e1(element);
|
|
4303
4308
|
}
|
|
4304
4309
|
}
|
|
@@ -4596,7 +4601,7 @@
|
|
|
4596
4601
|
var tmp5_elvis_lhs = tmp_4;
|
|
4597
4602
|
var releasedTrumps = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
|
|
4598
4603
|
var accountedTrumps = myTrumps.g1() + releasedTrumps | 0;
|
|
4599
|
-
var trumpsMostlyGone = accountedTrumps >= Companion_getInstance_6().
|
|
4604
|
+
var trumpsMostlyGone = accountedTrumps >= Companion_getInstance_6().hbd_1;
|
|
4600
4605
|
// Inline function 'kotlin.collections.filter' call
|
|
4601
4606
|
// Inline function 'kotlin.collections.filterTo' call
|
|
4602
4607
|
var destination_5 = ArrayList_init_$Create$();
|
|
@@ -5093,7 +5098,7 @@
|
|
|
5093
5098
|
while (_iterator__ex2g4s.u()) {
|
|
5094
5099
|
var element = _iterator__ex2g4s.v();
|
|
5095
5100
|
// Inline function 'kotlin.collections.takeWhile' call
|
|
5096
|
-
var this_0 = Companion_getInstance_6().
|
|
5101
|
+
var this_0 = Companion_getInstance_6().jbd_1;
|
|
5097
5102
|
var list = ArrayList_init_$Create$();
|
|
5098
5103
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
5099
5104
|
$l$loop: while (_iterator__ex2g4s_0.u()) {
|
|
@@ -5212,7 +5217,7 @@
|
|
|
5212
5217
|
return tmp$ret$11;
|
|
5213
5218
|
}
|
|
5214
5219
|
function selectFollow($this, hand, legalCards, currentTrick, trump, partnerWinning) {
|
|
5215
|
-
var firstSuit = first(currentTrick).
|
|
5220
|
+
var firstSuit = first(currentTrick).ebb_1.x6l();
|
|
5216
5221
|
if (partnerWinning) {
|
|
5217
5222
|
var tmp$ret$0;
|
|
5218
5223
|
$l$block_0: {
|
|
@@ -5248,10 +5253,10 @@
|
|
|
5248
5253
|
if (!iterator_0.u())
|
|
5249
5254
|
throw NoSuchElementException_init_$Create$();
|
|
5250
5255
|
var it_0 = iterator_0.v();
|
|
5251
|
-
var maxValue = getGrowth(it_0.
|
|
5256
|
+
var maxValue = getGrowth(it_0.ebb_1, trump, firstSuit);
|
|
5252
5257
|
while (iterator_0.u()) {
|
|
5253
5258
|
var it_1 = iterator_0.v();
|
|
5254
|
-
var v_0 = getGrowth(it_1.
|
|
5259
|
+
var v_0 = getGrowth(it_1.ebb_1, trump, firstSuit);
|
|
5255
5260
|
if (compareTo(maxValue, v_0) < 0) {
|
|
5256
5261
|
maxValue = v_0;
|
|
5257
5262
|
}
|
|
@@ -5376,11 +5381,11 @@
|
|
|
5376
5381
|
}
|
|
5377
5382
|
function Companion_6() {
|
|
5378
5383
|
Companion_instance_8 = this;
|
|
5379
|
-
this.
|
|
5380
|
-
this.
|
|
5381
|
-
this.
|
|
5382
|
-
this.
|
|
5383
|
-
this.
|
|
5384
|
+
this.fbd_1 = 8;
|
|
5385
|
+
this.gbd_1 = 3;
|
|
5386
|
+
this.hbd_1 = numberToInt(8 * 0.8);
|
|
5387
|
+
this.ibd_1 = setOf_0([CardName_KING_getInstance(), CardName_QUEEN_getInstance()]);
|
|
5388
|
+
this.jbd_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
5389
|
}
|
|
5385
5390
|
var Companion_instance_8;
|
|
5386
5391
|
function Companion_getInstance_6() {
|
|
@@ -5389,16 +5394,16 @@
|
|
|
5389
5394
|
return Companion_instance_8;
|
|
5390
5395
|
}
|
|
5391
5396
|
function sam$kotlin_Comparator$0_2(function_0) {
|
|
5392
|
-
this.
|
|
5397
|
+
this.kbd_1 = function_0;
|
|
5393
5398
|
}
|
|
5394
5399
|
protoOf(sam$kotlin_Comparator$0_2).hd = function (a, b) {
|
|
5395
|
-
return this.
|
|
5400
|
+
return this.kbd_1(a, b);
|
|
5396
5401
|
};
|
|
5397
5402
|
protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {
|
|
5398
5403
|
return this.hd(a, b);
|
|
5399
5404
|
};
|
|
5400
5405
|
protoOf(sam$kotlin_Comparator$0_2).s3 = function () {
|
|
5401
|
-
return this.
|
|
5406
|
+
return this.kbd_1;
|
|
5402
5407
|
};
|
|
5403
5408
|
protoOf(sam$kotlin_Comparator$0_2).equals = function (other) {
|
|
5404
5409
|
var tmp;
|
|
@@ -5419,16 +5424,16 @@
|
|
|
5419
5424
|
return hashCode(this.s3());
|
|
5420
5425
|
};
|
|
5421
5426
|
function sam$kotlin_Comparator$0_3(function_0) {
|
|
5422
|
-
this.
|
|
5427
|
+
this.lbd_1 = function_0;
|
|
5423
5428
|
}
|
|
5424
5429
|
protoOf(sam$kotlin_Comparator$0_3).hd = function (a, b) {
|
|
5425
|
-
return this.
|
|
5430
|
+
return this.lbd_1(a, b);
|
|
5426
5431
|
};
|
|
5427
5432
|
protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {
|
|
5428
5433
|
return this.hd(a, b);
|
|
5429
5434
|
};
|
|
5430
5435
|
protoOf(sam$kotlin_Comparator$0_3).s3 = function () {
|
|
5431
|
-
return this.
|
|
5436
|
+
return this.lbd_1;
|
|
5432
5437
|
};
|
|
5433
5438
|
protoOf(sam$kotlin_Comparator$0_3).equals = function (other) {
|
|
5434
5439
|
var tmp;
|
|
@@ -5449,16 +5454,16 @@
|
|
|
5449
5454
|
return hashCode(this.s3());
|
|
5450
5455
|
};
|
|
5451
5456
|
function sam$kotlin_Comparator$0_4(function_0) {
|
|
5452
|
-
this.
|
|
5457
|
+
this.mbd_1 = function_0;
|
|
5453
5458
|
}
|
|
5454
5459
|
protoOf(sam$kotlin_Comparator$0_4).hd = function (a, b) {
|
|
5455
|
-
return this.
|
|
5460
|
+
return this.mbd_1(a, b);
|
|
5456
5461
|
};
|
|
5457
5462
|
protoOf(sam$kotlin_Comparator$0_4).compare = function (a, b) {
|
|
5458
5463
|
return this.hd(a, b);
|
|
5459
5464
|
};
|
|
5460
5465
|
protoOf(sam$kotlin_Comparator$0_4).s3 = function () {
|
|
5461
|
-
return this.
|
|
5466
|
+
return this.mbd_1;
|
|
5462
5467
|
};
|
|
5463
5468
|
protoOf(sam$kotlin_Comparator$0_4).equals = function (other) {
|
|
5464
5469
|
var tmp;
|
|
@@ -5479,16 +5484,16 @@
|
|
|
5479
5484
|
return hashCode(this.s3());
|
|
5480
5485
|
};
|
|
5481
5486
|
function sam$kotlin_Comparator$0_5(function_0) {
|
|
5482
|
-
this.
|
|
5487
|
+
this.nbd_1 = function_0;
|
|
5483
5488
|
}
|
|
5484
5489
|
protoOf(sam$kotlin_Comparator$0_5).hd = function (a, b) {
|
|
5485
|
-
return this.
|
|
5490
|
+
return this.nbd_1(a, b);
|
|
5486
5491
|
};
|
|
5487
5492
|
protoOf(sam$kotlin_Comparator$0_5).compare = function (a, b) {
|
|
5488
5493
|
return this.hd(a, b);
|
|
5489
5494
|
};
|
|
5490
5495
|
protoOf(sam$kotlin_Comparator$0_5).s3 = function () {
|
|
5491
|
-
return this.
|
|
5496
|
+
return this.nbd_1;
|
|
5492
5497
|
};
|
|
5493
5498
|
protoOf(sam$kotlin_Comparator$0_5).equals = function (other) {
|
|
5494
5499
|
var tmp;
|
|
@@ -5509,16 +5514,16 @@
|
|
|
5509
5514
|
return hashCode(this.s3());
|
|
5510
5515
|
};
|
|
5511
5516
|
function sam$kotlin_Comparator$0_6(function_0) {
|
|
5512
|
-
this.
|
|
5517
|
+
this.obd_1 = function_0;
|
|
5513
5518
|
}
|
|
5514
5519
|
protoOf(sam$kotlin_Comparator$0_6).hd = function (a, b) {
|
|
5515
|
-
return this.
|
|
5520
|
+
return this.obd_1(a, b);
|
|
5516
5521
|
};
|
|
5517
5522
|
protoOf(sam$kotlin_Comparator$0_6).compare = function (a, b) {
|
|
5518
5523
|
return this.hd(a, b);
|
|
5519
5524
|
};
|
|
5520
5525
|
protoOf(sam$kotlin_Comparator$0_6).s3 = function () {
|
|
5521
|
-
return this.
|
|
5526
|
+
return this.obd_1;
|
|
5522
5527
|
};
|
|
5523
5528
|
protoOf(sam$kotlin_Comparator$0_6).equals = function (other) {
|
|
5524
5529
|
var tmp;
|
|
@@ -5993,7 +5998,7 @@
|
|
|
5993
5998
|
function RolloutPolicy() {
|
|
5994
5999
|
Companion_getInstance_6();
|
|
5995
6000
|
}
|
|
5996
|
-
protoOf(RolloutPolicy).
|
|
6001
|
+
protoOf(RolloutPolicy).pbd = function (hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids) {
|
|
5997
6002
|
if (legalCards.g1() === 1)
|
|
5998
6003
|
return first(legalCards);
|
|
5999
6004
|
var tmp;
|
|
@@ -6010,11 +6015,11 @@
|
|
|
6010
6015
|
}
|
|
6011
6016
|
return tmp;
|
|
6012
6017
|
};
|
|
6013
|
-
protoOf(RolloutPolicy).
|
|
6018
|
+
protoOf(RolloutPolicy).lbb = function (hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids, $super) {
|
|
6014
6019
|
opponentCards = opponentCards === VOID ? null : opponentCards;
|
|
6015
6020
|
releasedCards = releasedCards === VOID ? null : releasedCards;
|
|
6016
6021
|
opponentVoids = opponentVoids === VOID ? null : opponentVoids;
|
|
6017
|
-
return $super === VOID ? this.
|
|
6022
|
+
return $super === VOID ? this.pbd(hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids) : $super.pbd.call(this, hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids);
|
|
6018
6023
|
};
|
|
6019
6024
|
function buildEffectiveCards($this, ownCards, trumpCard, suit, circle) {
|
|
6020
6025
|
if (!(circle === 1) || trumpCard == null || !trumpCard.x6l().equals(suit))
|
|
@@ -6022,9 +6027,9 @@
|
|
|
6022
6027
|
return plus(ownCards, trumpCard);
|
|
6023
6028
|
}
|
|
6024
6029
|
function evaluateSuit($this, effectiveCards, trump, trumpCard) {
|
|
6025
|
-
var trumpControl = $this.
|
|
6026
|
-
var sideSuitPower = $this.
|
|
6027
|
-
var distributionBonus = $this.
|
|
6030
|
+
var trumpControl = $this.zbc_1.yaf(effectiveCards, trump);
|
|
6031
|
+
var sideSuitPower = $this.zbc_1.zaf(effectiveCards, trump);
|
|
6032
|
+
var distributionBonus = $this.zbc_1.aag(effectiveCards, trump);
|
|
6028
6033
|
var tmp;
|
|
6029
6034
|
if (!(trumpCard == null) && trumpCard.x6l().equals(trump)) {
|
|
6030
6035
|
tmp = getPoint(trumpCard, trump);
|
|
@@ -6035,10 +6040,10 @@
|
|
|
6035
6040
|
return trumpControl + sideSuitPower + distributionBonus + trumpCardPointBonus;
|
|
6036
6041
|
}
|
|
6037
6042
|
function getThreshold($this, mode, circle) {
|
|
6038
|
-
if (circle <= 1 && !($this.
|
|
6039
|
-
return $this.
|
|
6040
|
-
if (circle > 1 && !($this.
|
|
6041
|
-
return $this.
|
|
6043
|
+
if (circle <= 1 && !($this.abd_1 == null))
|
|
6044
|
+
return $this.abd_1;
|
|
6045
|
+
if (circle > 1 && !($this.bbd_1 == null))
|
|
6046
|
+
return $this.bbd_1;
|
|
6042
6047
|
var _destruct__k2r9zo;
|
|
6043
6048
|
switch (mode.a1_1) {
|
|
6044
6049
|
case 0:
|
|
@@ -6059,11 +6064,11 @@
|
|
|
6059
6064
|
calculator = calculator === VOID ? new HandStrengthCalculatorImpl() : calculator;
|
|
6060
6065
|
circle1Override = circle1Override === VOID ? null : circle1Override;
|
|
6061
6066
|
circle2Override = circle2Override === VOID ? null : circle2Override;
|
|
6062
|
-
this.
|
|
6063
|
-
this.
|
|
6064
|
-
this.
|
|
6067
|
+
this.zbc_1 = calculator;
|
|
6068
|
+
this.abd_1 = circle1Override;
|
|
6069
|
+
this.bbd_1 = circle2Override;
|
|
6065
6070
|
}
|
|
6066
|
-
protoOf(SuitSelectionPolicy).
|
|
6071
|
+
protoOf(SuitSelectionPolicy).cbd = function (state, legalActions) {
|
|
6067
6072
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
6068
6073
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
6069
6074
|
var destination = ArrayList_init_$Create$();
|
|
@@ -6085,7 +6090,7 @@
|
|
|
6085
6090
|
var _iterator__ex2g4s_0 = suitActions.t();
|
|
6086
6091
|
while (_iterator__ex2g4s_0.u()) {
|
|
6087
6092
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
6088
|
-
if (element_0.
|
|
6093
|
+
if (element_0.sb6_1 == null) {
|
|
6089
6094
|
tmp$ret$3 = element_0;
|
|
6090
6095
|
break $l$block;
|
|
6091
6096
|
}
|
|
@@ -6099,7 +6104,7 @@
|
|
|
6099
6104
|
var _iterator__ex2g4s_1 = suitActions.t();
|
|
6100
6105
|
while (_iterator__ex2g4s_1.u()) {
|
|
6101
6106
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
6102
|
-
if (!(element_1.
|
|
6107
|
+
if (!(element_1.sb6_1 == null)) {
|
|
6103
6108
|
destination_0.e1(element_1);
|
|
6104
6109
|
}
|
|
6105
6110
|
}
|
|
@@ -6108,10 +6113,10 @@
|
|
|
6108
6113
|
return passAction == null ? first(suitActions) : passAction;
|
|
6109
6114
|
}
|
|
6110
6115
|
var tmp;
|
|
6111
|
-
if (state.
|
|
6116
|
+
if (state.cb7_1.r()) {
|
|
6112
6117
|
tmp = 1;
|
|
6113
6118
|
} else {
|
|
6114
|
-
var tmp0 = state.
|
|
6119
|
+
var tmp0 = state.cb7_1;
|
|
6115
6120
|
var tmp$ret$7;
|
|
6116
6121
|
$l$block_0: {
|
|
6117
6122
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -6120,9 +6125,9 @@
|
|
|
6120
6125
|
tmp$ret$7 = null;
|
|
6121
6126
|
break $l$block_0;
|
|
6122
6127
|
}
|
|
6123
|
-
var maxValue = iterator.v().
|
|
6128
|
+
var maxValue = iterator.v().ub7_1;
|
|
6124
6129
|
while (iterator.u()) {
|
|
6125
|
-
var v = iterator.v().
|
|
6130
|
+
var v = iterator.v().ub7_1;
|
|
6126
6131
|
if (compareTo(maxValue, v) < 0) {
|
|
6127
6132
|
maxValue = v;
|
|
6128
6133
|
}
|
|
@@ -6133,7 +6138,7 @@
|
|
|
6133
6138
|
tmp = tmp2_elvis_lhs == null ? 1 : tmp2_elvis_lhs;
|
|
6134
6139
|
}
|
|
6135
6140
|
var circle = tmp;
|
|
6136
|
-
var threshold = getThreshold(this, state.
|
|
6141
|
+
var threshold = getThreshold(this, state.pb7_1, circle);
|
|
6137
6142
|
var bestSuit = null;
|
|
6138
6143
|
var bestScore = 0.0;
|
|
6139
6144
|
var bestUngatedSuit = null;
|
|
@@ -6141,7 +6146,7 @@
|
|
|
6141
6146
|
var _iterator__ex2g4s_2 = declareActions.t();
|
|
6142
6147
|
$l$loop_0: while (_iterator__ex2g4s_2.u()) {
|
|
6143
6148
|
var action = _iterator__ex2g4s_2.v();
|
|
6144
|
-
var tmp3_elvis_lhs = action.
|
|
6149
|
+
var tmp3_elvis_lhs = action.sb6_1;
|
|
6145
6150
|
var tmp_0;
|
|
6146
6151
|
if (tmp3_elvis_lhs == null) {
|
|
6147
6152
|
continue $l$loop_0;
|
|
@@ -6149,13 +6154,13 @@
|
|
|
6149
6154
|
tmp_0 = tmp3_elvis_lhs;
|
|
6150
6155
|
}
|
|
6151
6156
|
var suit = tmp_0;
|
|
6152
|
-
var effectiveCards = buildEffectiveCards(this, state.
|
|
6153
|
-
var score = evaluateSuit(this, effectiveCards, suit, state.
|
|
6157
|
+
var effectiveCards = buildEffectiveCards(this, state.wb6_1, state.ab7_1, suit, circle);
|
|
6158
|
+
var score = evaluateSuit(this, effectiveCards, suit, state.ab7_1);
|
|
6154
6159
|
if (score > bestUngatedScore) {
|
|
6155
6160
|
bestUngatedScore = score;
|
|
6156
6161
|
bestUngatedSuit = suit;
|
|
6157
6162
|
}
|
|
6158
|
-
if (!this.
|
|
6163
|
+
if (!this.qbd(effectiveCards, suit, circle))
|
|
6159
6164
|
continue $l$loop_0;
|
|
6160
6165
|
if (score > bestScore) {
|
|
6161
6166
|
bestScore = score;
|
|
@@ -6173,7 +6178,7 @@
|
|
|
6173
6178
|
}
|
|
6174
6179
|
return tmp_1;
|
|
6175
6180
|
};
|
|
6176
|
-
protoOf(SuitSelectionPolicy).
|
|
6181
|
+
protoOf(SuitSelectionPolicy).qbd = function (effectiveCards, trump, circle) {
|
|
6177
6182
|
// Inline function 'kotlin.collections.filter' call
|
|
6178
6183
|
// Inline function 'kotlin.collections.filterTo' call
|
|
6179
6184
|
var destination = ArrayList_init_$Create$();
|