client_plugin_logic_deb 1.8.478 → 1.8.480
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kotlin-DateTime-library-kotlinx-datetime.js +1 -1
- package/Logic_Debertz-ai_module.js.map +1 -1
- package/Logic_Debertz-bot_engine.js +706 -706
- package/Logic_Debertz-bot_engine.js.map +1 -1
- package/Logic_Debertz-client_plugin.d.ts +6 -0
- package/Logic_Debertz-client_plugin.js +2052 -2052
- package/Logic_Debertz-client_plugin.js.map +1 -1
- package/Logic_Debertz-core.js +1 -1
- package/Logic_Debertz-core.js.map +1 -1
- package/Logic_Debertz-engine.js +10012 -9979
- package/Logic_Debertz-engine.js.map +1 -1
- package/Logic_Debertz-game_client.js +6391 -6340
- package/Logic_Debertz-game_client.js.map +1 -1
- package/Logic_Debertz-game_server.js +927 -927
- package/Logic_Debertz-game_server.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +4 -4
- 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.wb6_1 = card;
|
|
213
|
+
this.xb6_1 = combinations;
|
|
214
214
|
}
|
|
215
215
|
protoOf(PlayCard).toString = function () {
|
|
216
|
-
return 'PlayCard(card=' + this.
|
|
216
|
+
return 'PlayCard(card=' + this.wb6_1.toString() + ', combinations=' + toString(this.xb6_1) + ')';
|
|
217
217
|
};
|
|
218
218
|
protoOf(PlayCard).hashCode = function () {
|
|
219
|
-
var result = this.
|
|
220
|
-
result = imul(result, 31) + (this.
|
|
219
|
+
var result = this.wb6_1.hashCode();
|
|
220
|
+
result = imul(result, 31) + (this.xb6_1 == null ? 0 : hashCode(this.xb6_1)) | 0;
|
|
221
221
|
return result;
|
|
222
222
|
};
|
|
223
223
|
protoOf(PlayCard).equals = function (other) {
|
|
@@ -225,47 +225,47 @@
|
|
|
225
225
|
return true;
|
|
226
226
|
if (!(other instanceof PlayCard))
|
|
227
227
|
return false;
|
|
228
|
-
if (!this.
|
|
228
|
+
if (!this.wb6_1.equals(other.wb6_1))
|
|
229
229
|
return false;
|
|
230
|
-
if (!equals(this.
|
|
230
|
+
if (!equals(this.xb6_1, other.xb6_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.yb6_1 = suit;
|
|
237
237
|
}
|
|
238
238
|
protoOf(SelectSuit).toString = function () {
|
|
239
|
-
return 'SelectSuit(suit=' + toString(this.
|
|
239
|
+
return 'SelectSuit(suit=' + toString(this.yb6_1) + ')';
|
|
240
240
|
};
|
|
241
241
|
protoOf(SelectSuit).hashCode = function () {
|
|
242
|
-
return this.
|
|
242
|
+
return this.yb6_1 == null ? 0 : this.yb6_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.yb6_1, other.yb6_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.zb6_1 = isAccepted;
|
|
256
256
|
}
|
|
257
257
|
protoOf(AcceptCombinations).toString = function () {
|
|
258
|
-
return 'AcceptCombinations(isAccepted=' + this.
|
|
258
|
+
return 'AcceptCombinations(isAccepted=' + this.zb6_1 + ')';
|
|
259
259
|
};
|
|
260
260
|
protoOf(AcceptCombinations).hashCode = function () {
|
|
261
|
-
return getBooleanHashCode(this.
|
|
261
|
+
return getBooleanHashCode(this.zb6_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.zb6_1 === other.zb6_1))
|
|
269
269
|
return false;
|
|
270
270
|
return true;
|
|
271
271
|
};
|
|
@@ -278,59 +278,59 @@
|
|
|
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.
|
|
304
|
-
this.
|
|
281
|
+
this.ab7_1 = focalPlayerId;
|
|
282
|
+
this.bb7_1 = playerOrder;
|
|
283
|
+
this.cb7_1 = ownCards;
|
|
284
|
+
this.db7_1 = playedCards;
|
|
285
|
+
this.eb7_1 = currentTrick;
|
|
286
|
+
this.fb7_1 = trump;
|
|
287
|
+
this.gb7_1 = trumpCard;
|
|
288
|
+
this.hb7_1 = isTrumpDeclarer;
|
|
289
|
+
this.ib7_1 = suitSelectionHistory;
|
|
290
|
+
this.jb7_1 = ownTeamScore;
|
|
291
|
+
this.kb7_1 = opponentTeamScore;
|
|
292
|
+
this.lb7_1 = ownRoundPoints;
|
|
293
|
+
this.mb7_1 = opponentRoundPoints;
|
|
294
|
+
this.nb7_1 = trickNumber;
|
|
295
|
+
this.ob7_1 = positionInTrick;
|
|
296
|
+
this.pb7_1 = ownTeamWonLastTrick;
|
|
297
|
+
this.qb7_1 = suitVoids;
|
|
298
|
+
this.rb7_1 = trumpTakenInFirstCircle;
|
|
299
|
+
this.sb7_1 = trumpDeclarerId;
|
|
300
|
+
this.tb7_1 = declaredCombinations;
|
|
301
|
+
this.ub7_1 = rules;
|
|
302
|
+
this.vb7_1 = playersMode;
|
|
303
|
+
this.wb7_1 = handSize;
|
|
304
|
+
this.xb7_1 = pointsMode;
|
|
305
305
|
}
|
|
306
306
|
protoOf(BotGameState).toString = function () {
|
|
307
|
-
return 'BotGameState(focalPlayerId=' + this.
|
|
307
|
+
return 'BotGameState(focalPlayerId=' + this.ab7_1 + ', playerOrder=' + toString_0(this.bb7_1) + ', ownCards=' + toString_0(this.cb7_1) + ', playedCards=' + toString_0(this.db7_1) + ', currentTrick=' + toString_0(this.eb7_1) + ', trump=' + toString(this.fb7_1) + ', trumpCard=' + toString(this.gb7_1) + ', isTrumpDeclarer=' + this.hb7_1 + ', suitSelectionHistory=' + toString_0(this.ib7_1) + ', ownTeamScore=' + this.jb7_1 + ', opponentTeamScore=' + this.kb7_1 + ', ownRoundPoints=' + this.lb7_1 + ', opponentRoundPoints=' + this.mb7_1 + ', trickNumber=' + this.nb7_1 + ', positionInTrick=' + this.ob7_1 + ', ownTeamWonLastTrick=' + this.pb7_1 + ', suitVoids=' + toString_0(this.qb7_1) + ', trumpTakenInFirstCircle=' + this.rb7_1 + ', trumpDeclarerId=' + this.sb7_1 + ', declaredCombinations=' + toString_0(this.tb7_1) + ', rules=' + this.ub7_1.toString() + ', playersMode=' + this.vb7_1.toString() + ', handSize=' + this.wb7_1 + ', pointsMode=' + this.xb7_1.toString() + ')';
|
|
308
308
|
};
|
|
309
309
|
protoOf(BotGameState).hashCode = function () {
|
|
310
|
-
var result = getStringHashCode(this.
|
|
311
|
-
result = imul(result, 31) + hashCode(this.
|
|
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;
|
|
310
|
+
var result = getStringHashCode(this.ab7_1);
|
|
311
|
+
result = imul(result, 31) + hashCode(this.bb7_1) | 0;
|
|
318
312
|
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) +
|
|
326
|
-
result = imul(result, 31) +
|
|
327
|
-
result = imul(result, 31) +
|
|
328
|
-
result = imul(result, 31) +
|
|
329
|
-
result = imul(result, 31) +
|
|
330
|
-
result = imul(result, 31) + this.ob7_1
|
|
331
|
-
result = imul(result, 31) + this.pb7_1
|
|
332
|
-
result = imul(result, 31) + this.qb7_1 | 0;
|
|
333
|
-
result = imul(result, 31) + this.rb7_1.
|
|
313
|
+
result = imul(result, 31) + hashCode(this.db7_1) | 0;
|
|
314
|
+
result = imul(result, 31) + hashCode(this.eb7_1) | 0;
|
|
315
|
+
result = imul(result, 31) + (this.fb7_1 == null ? 0 : this.fb7_1.hashCode()) | 0;
|
|
316
|
+
result = imul(result, 31) + (this.gb7_1 == null ? 0 : this.gb7_1.hashCode()) | 0;
|
|
317
|
+
result = imul(result, 31) + getBooleanHashCode(this.hb7_1) | 0;
|
|
318
|
+
result = imul(result, 31) + hashCode(this.ib7_1) | 0;
|
|
319
|
+
result = imul(result, 31) + this.jb7_1 | 0;
|
|
320
|
+
result = imul(result, 31) + this.kb7_1 | 0;
|
|
321
|
+
result = imul(result, 31) + this.lb7_1 | 0;
|
|
322
|
+
result = imul(result, 31) + this.mb7_1 | 0;
|
|
323
|
+
result = imul(result, 31) + this.nb7_1 | 0;
|
|
324
|
+
result = imul(result, 31) + this.ob7_1 | 0;
|
|
325
|
+
result = imul(result, 31) + getBooleanHashCode(this.pb7_1) | 0;
|
|
326
|
+
result = imul(result, 31) + hashCode(this.qb7_1) | 0;
|
|
327
|
+
result = imul(result, 31) + (this.rb7_1 == null ? 0 : getBooleanHashCode(this.rb7_1)) | 0;
|
|
328
|
+
result = imul(result, 31) + (this.sb7_1 == null ? 0 : getStringHashCode(this.sb7_1)) | 0;
|
|
329
|
+
result = imul(result, 31) + hashCode(this.tb7_1) | 0;
|
|
330
|
+
result = imul(result, 31) + this.ub7_1.hashCode() | 0;
|
|
331
|
+
result = imul(result, 31) + this.vb7_1.hashCode() | 0;
|
|
332
|
+
result = imul(result, 31) + this.wb7_1 | 0;
|
|
333
|
+
result = imul(result, 31) + this.xb7_1.hashCode() | 0;
|
|
334
334
|
return result;
|
|
335
335
|
};
|
|
336
336
|
protoOf(BotGameState).equals = function (other) {
|
|
@@ -338,68 +338,68 @@
|
|
|
338
338
|
return true;
|
|
339
339
|
if (!(other instanceof BotGameState))
|
|
340
340
|
return false;
|
|
341
|
-
if (!(this.
|
|
341
|
+
if (!(this.ab7_1 === other.ab7_1))
|
|
342
342
|
return false;
|
|
343
|
-
if (!equals(this.
|
|
343
|
+
if (!equals(this.bb7_1, other.bb7_1))
|
|
344
344
|
return false;
|
|
345
|
-
if (!equals(this.
|
|
345
|
+
if (!equals(this.cb7_1, other.cb7_1))
|
|
346
346
|
return false;
|
|
347
|
-
if (!equals(this.
|
|
347
|
+
if (!equals(this.db7_1, other.db7_1))
|
|
348
348
|
return false;
|
|
349
|
-
if (!equals(this.
|
|
349
|
+
if (!equals(this.eb7_1, other.eb7_1))
|
|
350
350
|
return false;
|
|
351
|
-
if (!equals(this.
|
|
351
|
+
if (!equals(this.fb7_1, other.fb7_1))
|
|
352
352
|
return false;
|
|
353
|
-
if (!equals(this.
|
|
353
|
+
if (!equals(this.gb7_1, other.gb7_1))
|
|
354
354
|
return false;
|
|
355
|
-
if (!(this.
|
|
355
|
+
if (!(this.hb7_1 === other.hb7_1))
|
|
356
356
|
return false;
|
|
357
|
-
if (!equals(this.
|
|
357
|
+
if (!equals(this.ib7_1, other.ib7_1))
|
|
358
358
|
return false;
|
|
359
|
-
if (!(this.
|
|
359
|
+
if (!(this.jb7_1 === other.jb7_1))
|
|
360
360
|
return false;
|
|
361
|
-
if (!(this.
|
|
361
|
+
if (!(this.kb7_1 === other.kb7_1))
|
|
362
362
|
return false;
|
|
363
|
-
if (!(this.
|
|
363
|
+
if (!(this.lb7_1 === other.lb7_1))
|
|
364
364
|
return false;
|
|
365
|
-
if (!(this.
|
|
365
|
+
if (!(this.mb7_1 === other.mb7_1))
|
|
366
366
|
return false;
|
|
367
|
-
if (!(this.
|
|
367
|
+
if (!(this.nb7_1 === other.nb7_1))
|
|
368
368
|
return false;
|
|
369
|
-
if (!(this.
|
|
369
|
+
if (!(this.ob7_1 === other.ob7_1))
|
|
370
370
|
return false;
|
|
371
|
-
if (!(this.
|
|
371
|
+
if (!(this.pb7_1 === other.pb7_1))
|
|
372
372
|
return false;
|
|
373
|
-
if (!equals(this.
|
|
373
|
+
if (!equals(this.qb7_1, other.qb7_1))
|
|
374
374
|
return false;
|
|
375
|
-
if (!(this.
|
|
375
|
+
if (!(this.rb7_1 == other.rb7_1))
|
|
376
376
|
return false;
|
|
377
|
-
if (!(this.
|
|
377
|
+
if (!(this.sb7_1 == other.sb7_1))
|
|
378
378
|
return false;
|
|
379
|
-
if (!equals(this.
|
|
379
|
+
if (!equals(this.tb7_1, other.tb7_1))
|
|
380
380
|
return false;
|
|
381
|
-
if (!this.
|
|
381
|
+
if (!this.ub7_1.equals(other.ub7_1))
|
|
382
382
|
return false;
|
|
383
|
-
if (!this.
|
|
383
|
+
if (!this.vb7_1.equals(other.vb7_1))
|
|
384
384
|
return false;
|
|
385
|
-
if (!(this.
|
|
385
|
+
if (!(this.wb7_1 === other.wb7_1))
|
|
386
386
|
return false;
|
|
387
|
-
if (!this.
|
|
387
|
+
if (!this.xb7_1.equals(other.xb7_1))
|
|
388
388
|
return false;
|
|
389
389
|
return true;
|
|
390
390
|
};
|
|
391
391
|
function SuitSelectionEvent(playerId, suit, circleNumber) {
|
|
392
|
-
this.
|
|
393
|
-
this.
|
|
394
|
-
this.
|
|
392
|
+
this.yb7_1 = playerId;
|
|
393
|
+
this.zb7_1 = suit;
|
|
394
|
+
this.ab8_1 = circleNumber;
|
|
395
395
|
}
|
|
396
396
|
protoOf(SuitSelectionEvent).toString = function () {
|
|
397
|
-
return 'SuitSelectionEvent(playerId=' + this.
|
|
397
|
+
return 'SuitSelectionEvent(playerId=' + this.yb7_1 + ', suit=' + toString(this.zb7_1) + ', circleNumber=' + this.ab8_1 + ')';
|
|
398
398
|
};
|
|
399
399
|
protoOf(SuitSelectionEvent).hashCode = function () {
|
|
400
|
-
var result = getStringHashCode(this.
|
|
401
|
-
result = imul(result, 31) + (this.
|
|
402
|
-
result = imul(result, 31) + this.
|
|
400
|
+
var result = getStringHashCode(this.yb7_1);
|
|
401
|
+
result = imul(result, 31) + (this.zb7_1 == null ? 0 : this.zb7_1.hashCode()) | 0;
|
|
402
|
+
result = imul(result, 31) + this.ab8_1 | 0;
|
|
403
403
|
return result;
|
|
404
404
|
};
|
|
405
405
|
protoOf(SuitSelectionEvent).equals = function (other) {
|
|
@@ -407,11 +407,11 @@
|
|
|
407
407
|
return true;
|
|
408
408
|
if (!(other instanceof SuitSelectionEvent))
|
|
409
409
|
return false;
|
|
410
|
-
if (!(this.
|
|
410
|
+
if (!(this.yb7_1 === other.yb7_1))
|
|
411
411
|
return false;
|
|
412
|
-
if (!equals(this.
|
|
412
|
+
if (!equals(this.zb7_1, other.zb7_1))
|
|
413
413
|
return false;
|
|
414
|
-
if (!(this.
|
|
414
|
+
if (!(this.ab8_1 === other.ab8_1))
|
|
415
415
|
return false;
|
|
416
416
|
return true;
|
|
417
417
|
};
|
|
@@ -419,36 +419,36 @@
|
|
|
419
419
|
var _iterator__ex2g4s = cards.t();
|
|
420
420
|
while (_iterator__ex2g4s.u()) {
|
|
421
421
|
var card = _iterator__ex2g4s.v();
|
|
422
|
-
vec[offset + CardLocationIndex_instance.
|
|
422
|
+
vec[offset + CardLocationIndex_instance.eb8(card) | 0] = 1.0;
|
|
423
423
|
}
|
|
424
424
|
return offset + 32 | 0;
|
|
425
425
|
}
|
|
426
426
|
function encodeCardOneHot($this, vec, offset, card) {
|
|
427
427
|
if (!(card == null)) {
|
|
428
|
-
vec[offset + CardLocationIndex_instance.
|
|
428
|
+
vec[offset + CardLocationIndex_instance.eb8(card) | 0] = 1.0;
|
|
429
429
|
}
|
|
430
430
|
return offset + 32 | 0;
|
|
431
431
|
}
|
|
432
432
|
function Companion() {
|
|
433
|
-
this.
|
|
434
|
-
this.
|
|
435
|
-
this.
|
|
433
|
+
this.fb8_1 = 32;
|
|
434
|
+
this.gb8_1 = 162.0;
|
|
435
|
+
this.hb8_1 = 8.0;
|
|
436
436
|
}
|
|
437
437
|
var Companion_instance_1;
|
|
438
438
|
function Companion_getInstance() {
|
|
439
439
|
return Companion_instance_1;
|
|
440
440
|
}
|
|
441
441
|
function sam$kotlin_Comparator$0(function_0) {
|
|
442
|
-
this.
|
|
442
|
+
this.ib8_1 = function_0;
|
|
443
443
|
}
|
|
444
444
|
protoOf(sam$kotlin_Comparator$0).hd = function (a, b) {
|
|
445
|
-
return this.
|
|
445
|
+
return this.ib8_1(a, b);
|
|
446
446
|
};
|
|
447
447
|
protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
|
|
448
448
|
return this.hd(a, b);
|
|
449
449
|
};
|
|
450
450
|
protoOf(sam$kotlin_Comparator$0).s3 = function () {
|
|
451
|
-
return this.
|
|
451
|
+
return this.ib8_1;
|
|
452
452
|
};
|
|
453
453
|
protoOf(sam$kotlin_Comparator$0).equals = function (other) {
|
|
454
454
|
var tmp;
|
|
@@ -470,33 +470,33 @@
|
|
|
470
470
|
};
|
|
471
471
|
function BeliefFeatureEncoder$encode$lambda(a, b) {
|
|
472
472
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
473
|
-
var tmp = a.
|
|
474
|
-
var tmp$ret$1 = b.
|
|
473
|
+
var tmp = a.y8k_1;
|
|
474
|
+
var tmp$ret$1 = b.y8k_1;
|
|
475
475
|
return compareValues(tmp, tmp$ret$1);
|
|
476
476
|
}
|
|
477
477
|
function BeliefFeatureEncoder(playersMode) {
|
|
478
|
-
this.
|
|
479
|
-
this.
|
|
480
|
-
this.
|
|
478
|
+
this.jb8_1 = playersMode;
|
|
479
|
+
this.kb8_1 = this.jb8_1.count;
|
|
480
|
+
this.lb8_1 = this.kb8_1 - 1 | 0;
|
|
481
481
|
var tmp = this;
|
|
482
482
|
// Inline function 'kotlin.run' call
|
|
483
|
-
tmp.
|
|
483
|
+
tmp.mb8_1 = ((((((((((((((32 + imul(32, this.kb8_1) | 0) + 96 | 0) + 4 | 0) + 32 | 0) + 1 | 0) + imul(this.kb8_1, 4) | 0) + 8 | 0) + 4 | 0) + 4 | 0) + this.lb8_1 | 0) + imul(this.lb8_1, 4) | 0) + 1 | 0) + this.lb8_1 | 0) + 4 | 0) + 1 | 0;
|
|
484
484
|
}
|
|
485
|
-
protoOf(BeliefFeatureEncoder).
|
|
486
|
-
var vec = new Float32Array(this.
|
|
485
|
+
protoOf(BeliefFeatureEncoder).nb8 = function (state) {
|
|
486
|
+
var vec = new Float32Array(this.mb8_1);
|
|
487
487
|
var offset = 0;
|
|
488
|
-
var focalIndex = state.
|
|
489
|
-
var n = state.
|
|
490
|
-
offset = encodeCardSet(this, vec, offset, state.
|
|
488
|
+
var focalIndex = state.bb7_1.o2(state.ab7_1);
|
|
489
|
+
var n = state.bb7_1.g1();
|
|
490
|
+
offset = encodeCardSet(this, vec, offset, state.cb7_1);
|
|
491
491
|
var inductionVariable = 0;
|
|
492
|
-
var last = this.
|
|
492
|
+
var last = this.kb8_1;
|
|
493
493
|
if (inductionVariable < last)
|
|
494
494
|
do {
|
|
495
495
|
var relPos = inductionVariable;
|
|
496
496
|
inductionVariable = inductionVariable + 1 | 0;
|
|
497
497
|
var absIdx = (focalIndex + relPos | 0) % n | 0;
|
|
498
498
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
499
|
-
var this_0 = state.
|
|
499
|
+
var this_0 = state.bb7_1;
|
|
500
500
|
var tmp;
|
|
501
501
|
if (0 <= absIdx ? absIdx < this_0.g1() : false) {
|
|
502
502
|
tmp = this_0.h1(absIdx);
|
|
@@ -505,12 +505,12 @@
|
|
|
505
505
|
}
|
|
506
506
|
var pid = tmp;
|
|
507
507
|
var tmp_0 = offset;
|
|
508
|
-
var tmp0_elvis_lhs = state.
|
|
508
|
+
var tmp0_elvis_lhs = state.db7_1.v2(pid);
|
|
509
509
|
offset = encodeCardSet(this, vec, tmp_0, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
|
|
510
510
|
}
|
|
511
511
|
while (inductionVariable < last);
|
|
512
512
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
513
|
-
var this_1 = state.
|
|
513
|
+
var this_1 = state.eb7_1;
|
|
514
514
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
515
515
|
var tmp_1 = BeliefFeatureEncoder$encode$lambda;
|
|
516
516
|
var tmp$ret$2 = new sam$kotlin_Comparator$0(tmp_1);
|
|
@@ -521,28 +521,28 @@
|
|
|
521
521
|
var slot = inductionVariable_0;
|
|
522
522
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
523
523
|
var tmp1_safe_receiver = getOrNull(sortedTrick, slot);
|
|
524
|
-
var card = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
524
|
+
var card = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z8k_1;
|
|
525
525
|
offset = encodeCardOneHot(this, vec, offset, card);
|
|
526
526
|
}
|
|
527
527
|
while (inductionVariable_0 <= 2);
|
|
528
|
-
var trump = state.
|
|
528
|
+
var trump = state.fb7_1;
|
|
529
529
|
if (!(trump == null)) {
|
|
530
530
|
vec[offset + trump.a1_1 | 0] = 1.0;
|
|
531
531
|
}
|
|
532
532
|
offset = offset + 4 | 0;
|
|
533
|
-
offset = encodeCardOneHot(this, vec, offset, state.
|
|
533
|
+
offset = encodeCardOneHot(this, vec, offset, state.gb7_1);
|
|
534
534
|
var _unary__edvuaz = offset;
|
|
535
535
|
offset = _unary__edvuaz + 1 | 0;
|
|
536
|
-
vec[_unary__edvuaz] = state.
|
|
536
|
+
vec[_unary__edvuaz] = state.hb7_1 ? 1.0 : 0.0;
|
|
537
537
|
var inductionVariable_1 = 0;
|
|
538
|
-
var last_0 = this.
|
|
538
|
+
var last_0 = this.kb8_1;
|
|
539
539
|
if (inductionVariable_1 < last_0)
|
|
540
540
|
do {
|
|
541
541
|
var relPos_0 = inductionVariable_1;
|
|
542
542
|
inductionVariable_1 = inductionVariable_1 + 1 | 0;
|
|
543
543
|
var absIdx_0 = (focalIndex + relPos_0 | 0) % n | 0;
|
|
544
544
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
545
|
-
var this_2 = state.
|
|
545
|
+
var this_2 = state.bb7_1;
|
|
546
546
|
var tmp_2;
|
|
547
547
|
if (0 <= absIdx_0 ? absIdx_0 < this_2.g1() : false) {
|
|
548
548
|
tmp_2 = this_2.h1(absIdx_0);
|
|
@@ -551,13 +551,13 @@
|
|
|
551
551
|
}
|
|
552
552
|
var pid_0 = tmp_2;
|
|
553
553
|
// Inline function 'kotlin.collections.filter' call
|
|
554
|
-
var tmp0 = state.
|
|
554
|
+
var tmp0 = state.ib7_1;
|
|
555
555
|
// Inline function 'kotlin.collections.filterTo' call
|
|
556
556
|
var destination = ArrayList_init_$Create$();
|
|
557
557
|
var _iterator__ex2g4s = tmp0.t();
|
|
558
558
|
while (_iterator__ex2g4s.u()) {
|
|
559
559
|
var element = _iterator__ex2g4s.v();
|
|
560
|
-
if (element.
|
|
560
|
+
if (element.yb7_1 === pid_0 && !(element.zb7_1 == null)) {
|
|
561
561
|
destination.e1(element);
|
|
562
562
|
}
|
|
563
563
|
}
|
|
@@ -568,7 +568,7 @@
|
|
|
568
568
|
var _iterator__ex2g4s_0 = destination.t();
|
|
569
569
|
while (_iterator__ex2g4s_0.u()) {
|
|
570
570
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
571
|
-
var tmp0_safe_receiver = element_0.
|
|
571
|
+
var tmp0_safe_receiver = element_0.zb7_1;
|
|
572
572
|
if (tmp0_safe_receiver == null)
|
|
573
573
|
null;
|
|
574
574
|
else {
|
|
@@ -589,34 +589,34 @@
|
|
|
589
589
|
while (inductionVariable_2 < 4);
|
|
590
590
|
}
|
|
591
591
|
while (inductionVariable_1 < last_0);
|
|
592
|
-
var trickIdx = coerceIn(state.
|
|
592
|
+
var trickIdx = coerceIn(state.nb7_1, 0, 7);
|
|
593
593
|
vec[offset + trickIdx | 0] = 1.0;
|
|
594
594
|
offset = offset + 8 | 0;
|
|
595
|
-
var posIdx = coerceIn(state.
|
|
595
|
+
var posIdx = coerceIn(state.ob7_1, 0, 3);
|
|
596
596
|
vec[offset + posIdx | 0] = 1.0;
|
|
597
597
|
offset = offset + 4 | 0;
|
|
598
|
-
var winTarget = coerceAtLeast(state.
|
|
598
|
+
var winTarget = coerceAtLeast(state.xb7_1.value, 1.0);
|
|
599
599
|
var _unary__edvuaz_1 = offset;
|
|
600
600
|
offset = _unary__edvuaz_1 + 1 | 0;
|
|
601
|
-
vec[_unary__edvuaz_1] = state.
|
|
601
|
+
vec[_unary__edvuaz_1] = state.jb7_1 / winTarget;
|
|
602
602
|
var _unary__edvuaz_2 = offset;
|
|
603
603
|
offset = _unary__edvuaz_2 + 1 | 0;
|
|
604
|
-
vec[_unary__edvuaz_2] = state.
|
|
604
|
+
vec[_unary__edvuaz_2] = state.kb7_1 / winTarget;
|
|
605
605
|
var _unary__edvuaz_3 = offset;
|
|
606
606
|
offset = _unary__edvuaz_3 + 1 | 0;
|
|
607
|
-
vec[_unary__edvuaz_3] = state.
|
|
607
|
+
vec[_unary__edvuaz_3] = state.lb7_1 / 162.0;
|
|
608
608
|
var _unary__edvuaz_4 = offset;
|
|
609
609
|
offset = _unary__edvuaz_4 + 1 | 0;
|
|
610
|
-
vec[_unary__edvuaz_4] = state.
|
|
610
|
+
vec[_unary__edvuaz_4] = state.mb7_1 / 162.0;
|
|
611
611
|
var inductionVariable_3 = 1;
|
|
612
|
-
var last_1 = this.
|
|
612
|
+
var last_1 = this.lb8_1;
|
|
613
613
|
if (inductionVariable_3 <= last_1)
|
|
614
614
|
do {
|
|
615
615
|
var relPos_1 = inductionVariable_3;
|
|
616
616
|
inductionVariable_3 = inductionVariable_3 + 1 | 0;
|
|
617
617
|
var absIdx_1 = (focalIndex + relPos_1 | 0) % n | 0;
|
|
618
618
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
619
|
-
var this_3 = state.
|
|
619
|
+
var this_3 = state.bb7_1;
|
|
620
620
|
var tmp_3;
|
|
621
621
|
if (0 <= absIdx_1 ? absIdx_1 < this_3.g1() : false) {
|
|
622
622
|
tmp_3 = this_3.h1(absIdx_1);
|
|
@@ -624,23 +624,23 @@
|
|
|
624
624
|
tmp_3 = '';
|
|
625
625
|
}
|
|
626
626
|
var pid_1 = tmp_3;
|
|
627
|
-
var tmp2_elvis_lhs = state.
|
|
627
|
+
var tmp2_elvis_lhs = state.db7_1.v2(pid_1);
|
|
628
628
|
var played = (tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs).g1();
|
|
629
|
-
var remaining = coerceAtLeast_0(state.
|
|
629
|
+
var remaining = coerceAtLeast_0(state.wb7_1 - played | 0, 0);
|
|
630
630
|
var _unary__edvuaz_5 = offset;
|
|
631
631
|
offset = _unary__edvuaz_5 + 1 | 0;
|
|
632
|
-
vec[_unary__edvuaz_5] = remaining / coerceAtLeast(state.
|
|
632
|
+
vec[_unary__edvuaz_5] = remaining / coerceAtLeast(state.wb7_1, 1.0);
|
|
633
633
|
}
|
|
634
634
|
while (!(relPos_1 === last_1));
|
|
635
635
|
var inductionVariable_4 = 1;
|
|
636
|
-
var last_2 = this.
|
|
636
|
+
var last_2 = this.lb8_1;
|
|
637
637
|
if (inductionVariable_4 <= last_2)
|
|
638
638
|
do {
|
|
639
639
|
var relPos_2 = inductionVariable_4;
|
|
640
640
|
inductionVariable_4 = inductionVariable_4 + 1 | 0;
|
|
641
641
|
var absIdx_2 = (focalIndex + relPos_2 | 0) % n | 0;
|
|
642
642
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
643
|
-
var this_4 = state.
|
|
643
|
+
var this_4 = state.bb7_1;
|
|
644
644
|
var tmp_4;
|
|
645
645
|
if (0 <= absIdx_2 ? absIdx_2 < this_4.g1() : false) {
|
|
646
646
|
tmp_4 = this_4.h1(absIdx_2);
|
|
@@ -648,7 +648,7 @@
|
|
|
648
648
|
tmp_4 = '';
|
|
649
649
|
}
|
|
650
650
|
var pid_2 = tmp_4;
|
|
651
|
-
var tmp3_elvis_lhs = state.
|
|
651
|
+
var tmp3_elvis_lhs = state.qb7_1.v2(pid_2);
|
|
652
652
|
var voidsForPlayer = tmp3_elvis_lhs == null ? emptySet() : tmp3_elvis_lhs;
|
|
653
653
|
var inductionVariable_5 = 0;
|
|
654
654
|
if (inductionVariable_5 < 4)
|
|
@@ -664,17 +664,17 @@
|
|
|
664
664
|
while (!(relPos_2 === last_2));
|
|
665
665
|
var _unary__edvuaz_7 = offset;
|
|
666
666
|
offset = _unary__edvuaz_7 + 1 | 0;
|
|
667
|
-
vec[_unary__edvuaz_7] = state.
|
|
668
|
-
var declarerId = state.
|
|
667
|
+
vec[_unary__edvuaz_7] = state.rb7_1 === true ? 1.0 : 0.0;
|
|
668
|
+
var declarerId = state.sb7_1;
|
|
669
669
|
var inductionVariable_6 = 1;
|
|
670
|
-
var last_3 = this.
|
|
670
|
+
var last_3 = this.lb8_1;
|
|
671
671
|
if (inductionVariable_6 <= last_3)
|
|
672
672
|
do {
|
|
673
673
|
var relPos_3 = inductionVariable_6;
|
|
674
674
|
inductionVariable_6 = inductionVariable_6 + 1 | 0;
|
|
675
675
|
var absIdx_3 = (focalIndex + relPos_3 | 0) % n | 0;
|
|
676
676
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
677
|
-
var this_5 = state.
|
|
677
|
+
var this_5 = state.bb7_1;
|
|
678
678
|
var tmp_5;
|
|
679
679
|
if (0 <= absIdx_3 ? absIdx_3 < this_5.g1() : false) {
|
|
680
680
|
tmp_5 = this_5.h1(absIdx_3);
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
while (!(relPos_3 === last_3));
|
|
690
690
|
var suitCounts = new Int32Array(4);
|
|
691
691
|
// Inline function 'kotlin.collections.iterator' call
|
|
692
|
-
var _iterator__ex2g4s_1 = state.
|
|
692
|
+
var _iterator__ex2g4s_1 = state.db7_1.m1().t();
|
|
693
693
|
while (_iterator__ex2g4s_1.u()) {
|
|
694
694
|
// Inline function 'kotlin.collections.component2' call
|
|
695
695
|
var cards = _iterator__ex2g4s_1.v().o1();
|
|
@@ -700,10 +700,10 @@
|
|
|
700
700
|
suitCounts[_index_0__fvwizt] = suitCounts[_index_0__fvwizt] + 1 | 0;
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
var _iterator__ex2g4s_3 = state.
|
|
703
|
+
var _iterator__ex2g4s_3 = state.eb7_1.t();
|
|
704
704
|
while (_iterator__ex2g4s_3.u()) {
|
|
705
705
|
var cot = _iterator__ex2g4s_3.v();
|
|
706
|
-
var _index_0__fvwizt_0 = cot.
|
|
706
|
+
var _index_0__fvwizt_0 = cot.z8k_1.x6l().a1_1;
|
|
707
707
|
suitCounts[_index_0__fvwizt_0] = suitCounts[_index_0__fvwizt_0] + 1 | 0;
|
|
708
708
|
}
|
|
709
709
|
var inductionVariable_7 = 0;
|
|
@@ -718,10 +718,10 @@
|
|
|
718
718
|
while (inductionVariable_7 < 4);
|
|
719
719
|
var _unary__edvuaz_10 = offset;
|
|
720
720
|
offset = _unary__edvuaz_10 + 1 | 0;
|
|
721
|
-
vec[_unary__edvuaz_10] = state.
|
|
721
|
+
vec[_unary__edvuaz_10] = state.pb7_1 ? 1.0 : 0.0;
|
|
722
722
|
// Inline function 'kotlin.check' call
|
|
723
|
-
if (!(offset === this.
|
|
724
|
-
var message = 'BeliefFeatureEncoder: wrote ' + offset + ' floats but expected ' + this.
|
|
723
|
+
if (!(offset === this.mb8_1)) {
|
|
724
|
+
var message = 'BeliefFeatureEncoder: wrote ' + offset + ' floats but expected ' + this.mb8_1;
|
|
725
725
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
726
726
|
}
|
|
727
727
|
return vec;
|
|
@@ -732,38 +732,38 @@
|
|
|
732
732
|
return 1.0 / (1.0 + Math.exp(x_0));
|
|
733
733
|
}
|
|
734
734
|
function CardBeliefNetwork(engine, encoder, playersMode) {
|
|
735
|
-
this.
|
|
736
|
-
this.
|
|
737
|
-
this.
|
|
738
|
-
this.
|
|
739
|
-
this.
|
|
740
|
-
}
|
|
741
|
-
protoOf(CardBeliefNetwork).
|
|
742
|
-
this.
|
|
743
|
-
this.
|
|
735
|
+
this.ob8_1 = engine;
|
|
736
|
+
this.pb8_1 = encoder;
|
|
737
|
+
this.qb8_1 = playersMode;
|
|
738
|
+
this.rb8_1 = CardLocationIndex_instance.tb8(this.qb8_1);
|
|
739
|
+
this.sb8_1 = false;
|
|
740
|
+
}
|
|
741
|
+
protoOf(CardBeliefNetwork).ub8 = function (modelBytes) {
|
|
742
|
+
this.ob8_1.ub8(modelBytes);
|
|
743
|
+
this.sb8_1 = true;
|
|
744
744
|
};
|
|
745
|
-
protoOf(CardBeliefNetwork).
|
|
745
|
+
protoOf(CardBeliefNetwork).vb8 = function (state) {
|
|
746
746
|
var knownCards = booleanArray(32);
|
|
747
|
-
var _iterator__ex2g4s = state.
|
|
747
|
+
var _iterator__ex2g4s = state.cb7_1.t();
|
|
748
748
|
while (_iterator__ex2g4s.u()) {
|
|
749
749
|
var card = _iterator__ex2g4s.v();
|
|
750
|
-
knownCards[CardLocationIndex_instance.
|
|
750
|
+
knownCards[CardLocationIndex_instance.eb8(card)] = true;
|
|
751
751
|
}
|
|
752
752
|
// Inline function 'kotlin.collections.iterator' call
|
|
753
|
-
var _iterator__ex2g4s_0 = state.
|
|
753
|
+
var _iterator__ex2g4s_0 = state.db7_1.m1().t();
|
|
754
754
|
while (_iterator__ex2g4s_0.u()) {
|
|
755
755
|
// Inline function 'kotlin.collections.component2' call
|
|
756
756
|
var cards = _iterator__ex2g4s_0.v().o1();
|
|
757
757
|
var _iterator__ex2g4s_1 = cards.t();
|
|
758
758
|
while (_iterator__ex2g4s_1.u()) {
|
|
759
759
|
var card_0 = _iterator__ex2g4s_1.v();
|
|
760
|
-
knownCards[CardLocationIndex_instance.
|
|
760
|
+
knownCards[CardLocationIndex_instance.eb8(card_0)] = true;
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
|
-
var _iterator__ex2g4s_2 = state.
|
|
763
|
+
var _iterator__ex2g4s_2 = state.eb7_1.t();
|
|
764
764
|
while (_iterator__ex2g4s_2.u()) {
|
|
765
765
|
var cot = _iterator__ex2g4s_2.v();
|
|
766
|
-
knownCards[CardLocationIndex_instance.
|
|
766
|
+
knownCards[CardLocationIndex_instance.eb8(cot.z8k_1)] = true;
|
|
767
767
|
}
|
|
768
768
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
769
769
|
var hiddenIndices = ArrayList_init_$Create$();
|
|
@@ -777,8 +777,8 @@
|
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
while (inductionVariable < 32);
|
|
780
|
-
if (!this.
|
|
781
|
-
var uniform = 1.0 / this.
|
|
780
|
+
if (!this.sb8_1) {
|
|
781
|
+
var uniform = 1.0 / this.rb8_1;
|
|
782
782
|
var tmp = 0;
|
|
783
783
|
var tmp_0 = hiddenIndices.g1();
|
|
784
784
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
@@ -786,7 +786,7 @@
|
|
|
786
786
|
while (tmp < tmp_0) {
|
|
787
787
|
var tmp_2 = tmp;
|
|
788
788
|
var tmp_3 = 0;
|
|
789
|
-
var tmp_4 = this.
|
|
789
|
+
var tmp_4 = this.rb8_1;
|
|
790
790
|
var tmp_5 = new Float32Array(tmp_4);
|
|
791
791
|
while (tmp_3 < tmp_4) {
|
|
792
792
|
tmp_5[tmp_3] = uniform;
|
|
@@ -798,8 +798,8 @@
|
|
|
798
798
|
var matrix = tmp_1;
|
|
799
799
|
return new CardBeliefResult(matrix, toIntArray(hiddenIndices));
|
|
800
800
|
}
|
|
801
|
-
var features = this.
|
|
802
|
-
var rawOutput = this.
|
|
801
|
+
var features = this.pb8_1.nb8(state);
|
|
802
|
+
var rawOutput = this.ob8_1.wb8(features);
|
|
803
803
|
var tmp_6 = 0;
|
|
804
804
|
var tmp_7 = hiddenIndices.g1();
|
|
805
805
|
// Inline function 'kotlin.arrayOfNulls' call
|
|
@@ -808,7 +808,7 @@
|
|
|
808
808
|
var tmp_9 = tmp_6;
|
|
809
809
|
var cardIdx = hiddenIndices.h1(tmp_9);
|
|
810
810
|
var tmp_10;
|
|
811
|
-
if (this.
|
|
811
|
+
if (this.rb8_1 === 1) {
|
|
812
812
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
813
813
|
var tmp_11;
|
|
814
814
|
if (0 <= cardIdx ? cardIdx <= (rawOutput.length - 1 | 0) : false) {
|
|
@@ -820,9 +820,9 @@
|
|
|
820
820
|
// Inline function 'kotlin.floatArrayOf' call
|
|
821
821
|
tmp_10 = new Float32Array([sigmoid(this, logit)]);
|
|
822
822
|
} else {
|
|
823
|
-
var rowStart = imul(cardIdx, this.
|
|
823
|
+
var rowStart = imul(cardIdx, this.rb8_1);
|
|
824
824
|
var tmp_12 = 0;
|
|
825
|
-
var tmp_13 = this.
|
|
825
|
+
var tmp_13 = this.rb8_1;
|
|
826
826
|
var tmp_14 = new Float32Array(tmp_13);
|
|
827
827
|
while (tmp_12 < tmp_13) {
|
|
828
828
|
var tmp_15 = tmp_12;
|
|
@@ -838,7 +838,7 @@
|
|
|
838
838
|
tmp_12 = tmp_12 + 1 | 0;
|
|
839
839
|
}
|
|
840
840
|
var logits = tmp_14;
|
|
841
|
-
tmp_10 = Companion_instance_4.
|
|
841
|
+
tmp_10 = Companion_instance_4.yb8(logits);
|
|
842
842
|
}
|
|
843
843
|
tmp_8[tmp_9] = tmp_10;
|
|
844
844
|
tmp_6 = tmp_6 + 1 | 0;
|
|
@@ -847,8 +847,8 @@
|
|
|
847
847
|
return new CardBeliefResult(matrix_0, toIntArray(hiddenIndices));
|
|
848
848
|
};
|
|
849
849
|
function CardBeliefResult(beliefMatrix, hiddenCardIndices) {
|
|
850
|
-
this.
|
|
851
|
-
this.
|
|
850
|
+
this.zb8_1 = beliefMatrix;
|
|
851
|
+
this.ab9_1 = hiddenCardIndices;
|
|
852
852
|
}
|
|
853
853
|
protoOf(CardBeliefResult).equals = function (other) {
|
|
854
854
|
if (this === other)
|
|
@@ -858,8 +858,8 @@
|
|
|
858
858
|
if (!(other instanceof CardBeliefResult))
|
|
859
859
|
THROW_CCE();
|
|
860
860
|
var tmp;
|
|
861
|
-
if (contentEquals_0(this.
|
|
862
|
-
var tmp0 = get_indices(this.
|
|
861
|
+
if (contentEquals_0(this.ab9_1, other.ab9_1) && this.zb8_1.length === other.zb8_1.length) {
|
|
862
|
+
var tmp0 = get_indices(this.zb8_1);
|
|
863
863
|
var tmp$ret$0;
|
|
864
864
|
$l$block_0: {
|
|
865
865
|
// Inline function 'kotlin.collections.all' call
|
|
@@ -880,7 +880,7 @@
|
|
|
880
880
|
var element = inductionVariable;
|
|
881
881
|
inductionVariable = inductionVariable + 1 | 0;
|
|
882
882
|
var it = element;
|
|
883
|
-
if (!contentEquals(this.
|
|
883
|
+
if (!contentEquals(this.zb8_1[it], other.zb8_1[it])) {
|
|
884
884
|
tmp$ret$0 = false;
|
|
885
885
|
break $l$block_0;
|
|
886
886
|
}
|
|
@@ -895,22 +895,22 @@
|
|
|
895
895
|
return tmp;
|
|
896
896
|
};
|
|
897
897
|
protoOf(CardBeliefResult).hashCode = function () {
|
|
898
|
-
var result = contentHashCode(this.
|
|
899
|
-
result = imul(31, result) + contentDeepHashCode(this.
|
|
898
|
+
var result = contentHashCode(this.ab9_1);
|
|
899
|
+
result = imul(31, result) + contentDeepHashCode(this.zb8_1) | 0;
|
|
900
900
|
return result;
|
|
901
901
|
};
|
|
902
902
|
protoOf(CardBeliefResult).toString = function () {
|
|
903
|
-
return 'CardBeliefResult(beliefMatrix=' + toString_0(this.
|
|
903
|
+
return 'CardBeliefResult(beliefMatrix=' + toString_0(this.zb8_1) + ', hiddenCardIndices=' + toString_0(this.ab9_1) + ')';
|
|
904
904
|
};
|
|
905
905
|
function CardLocationIndex() {
|
|
906
|
-
this.
|
|
907
|
-
this.
|
|
908
|
-
this.
|
|
906
|
+
this.bb8_1 = 32;
|
|
907
|
+
this.cb8_1 = 4;
|
|
908
|
+
this.db8_1 = 8;
|
|
909
909
|
}
|
|
910
|
-
protoOf(CardLocationIndex).
|
|
910
|
+
protoOf(CardLocationIndex).eb8 = function (card) {
|
|
911
911
|
return imul(card.x6l().a1_1, 8) + card.m().a1_1 | 0;
|
|
912
912
|
};
|
|
913
|
-
protoOf(CardLocationIndex).
|
|
913
|
+
protoOf(CardLocationIndex).tb8 = function (mode) {
|
|
914
914
|
return mode.count - 1 | 0;
|
|
915
915
|
};
|
|
916
916
|
var CardLocationIndex_instance;
|
|
@@ -918,16 +918,16 @@
|
|
|
918
918
|
return CardLocationIndex_instance;
|
|
919
919
|
}
|
|
920
920
|
function sam$kotlin_Comparator$0_0(function_0) {
|
|
921
|
-
this.
|
|
921
|
+
this.bb9_1 = function_0;
|
|
922
922
|
}
|
|
923
923
|
protoOf(sam$kotlin_Comparator$0_0).hd = function (a, b) {
|
|
924
|
-
return this.
|
|
924
|
+
return this.bb9_1(a, b);
|
|
925
925
|
};
|
|
926
926
|
protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
|
|
927
927
|
return this.hd(a, b);
|
|
928
928
|
};
|
|
929
929
|
protoOf(sam$kotlin_Comparator$0_0).s3 = function () {
|
|
930
|
-
return this.
|
|
930
|
+
return this.bb9_1;
|
|
931
931
|
};
|
|
932
932
|
protoOf(sam$kotlin_Comparator$0_0).equals = function (other) {
|
|
933
933
|
var tmp;
|
|
@@ -949,13 +949,13 @@
|
|
|
949
949
|
};
|
|
950
950
|
function SuitVoidDetector$detectVoids$lambda(a, b) {
|
|
951
951
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
952
|
-
var tmp = a.
|
|
953
|
-
var tmp$ret$1 = b.
|
|
952
|
+
var tmp = a.y8k_1;
|
|
953
|
+
var tmp$ret$1 = b.y8k_1;
|
|
954
954
|
return compareValues(tmp, tmp$ret$1);
|
|
955
955
|
}
|
|
956
956
|
function SuitVoidDetector() {
|
|
957
957
|
}
|
|
958
|
-
protoOf(SuitVoidDetector).
|
|
958
|
+
protoOf(SuitVoidDetector).cb9 = function (tricks) {
|
|
959
959
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
960
960
|
var voids = LinkedHashMap_init_$Create$();
|
|
961
961
|
var _iterator__ex2g4s = tricks.t();
|
|
@@ -968,13 +968,13 @@
|
|
|
968
968
|
var tmp = SuitVoidDetector$detectVoids$lambda;
|
|
969
969
|
var tmp$ret$1 = new sam$kotlin_Comparator$0_0(tmp);
|
|
970
970
|
var sorted = sortedWith(trick, tmp$ret$1);
|
|
971
|
-
var leadSuit = first(sorted).
|
|
971
|
+
var leadSuit = first(sorted).z8k_1.x6l();
|
|
972
972
|
var _iterator__ex2g4s_0 = sorted.t();
|
|
973
973
|
while (_iterator__ex2g4s_0.u()) {
|
|
974
974
|
var cardOnTable = _iterator__ex2g4s_0.v();
|
|
975
|
-
if (!cardOnTable.
|
|
975
|
+
if (!cardOnTable.z8k_1.x6l().equals(leadSuit)) {
|
|
976
976
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
977
|
-
var key = cardOnTable.
|
|
977
|
+
var key = cardOnTable.x8k_1;
|
|
978
978
|
var value = voids.v2(key);
|
|
979
979
|
var tmp_0;
|
|
980
980
|
if (value == null) {
|
|
@@ -996,17 +996,17 @@
|
|
|
996
996
|
return SuitVoidDetector_instance;
|
|
997
997
|
}
|
|
998
998
|
function BotModelConfig(playersMode, rulesSetType, modelBytes) {
|
|
999
|
-
this.
|
|
1000
|
-
this.
|
|
1001
|
-
this.
|
|
999
|
+
this.db9_1 = playersMode;
|
|
1000
|
+
this.eb9_1 = rulesSetType;
|
|
1001
|
+
this.fb9_1 = modelBytes;
|
|
1002
1002
|
}
|
|
1003
1003
|
protoOf(BotModelConfig).toString = function () {
|
|
1004
|
-
return 'BotModelConfig(playersMode=' + this.
|
|
1004
|
+
return 'BotModelConfig(playersMode=' + this.db9_1.toString() + ', rulesSetType=' + this.eb9_1.toString() + ', modelBytes=' + toString_0(this.fb9_1) + ')';
|
|
1005
1005
|
};
|
|
1006
1006
|
protoOf(BotModelConfig).hashCode = function () {
|
|
1007
|
-
var result = this.
|
|
1008
|
-
result = imul(result, 31) + this.
|
|
1009
|
-
result = imul(result, 31) + hashCode(this.
|
|
1007
|
+
var result = this.db9_1.hashCode();
|
|
1008
|
+
result = imul(result, 31) + this.eb9_1.hashCode() | 0;
|
|
1009
|
+
result = imul(result, 31) + hashCode(this.fb9_1) | 0;
|
|
1010
1010
|
return result;
|
|
1011
1011
|
};
|
|
1012
1012
|
protoOf(BotModelConfig).equals = function (other) {
|
|
@@ -1014,43 +1014,43 @@
|
|
|
1014
1014
|
return true;
|
|
1015
1015
|
if (!(other instanceof BotModelConfig))
|
|
1016
1016
|
return false;
|
|
1017
|
-
if (!this.
|
|
1017
|
+
if (!this.db9_1.equals(other.db9_1))
|
|
1018
1018
|
return false;
|
|
1019
|
-
if (!this.
|
|
1019
|
+
if (!this.eb9_1.equals(other.eb9_1))
|
|
1020
1020
|
return false;
|
|
1021
|
-
if (!equals(this.
|
|
1021
|
+
if (!equals(this.fb9_1, other.fb9_1))
|
|
1022
1022
|
return false;
|
|
1023
1023
|
return true;
|
|
1024
1024
|
};
|
|
1025
1025
|
function BotModelRegistry() {
|
|
1026
1026
|
var tmp = this;
|
|
1027
1027
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1028
|
-
tmp.
|
|
1028
|
+
tmp.gb9_1 = LinkedHashMap_init_$Create$();
|
|
1029
1029
|
}
|
|
1030
|
-
protoOf(BotModelRegistry).
|
|
1031
|
-
var tmp0 = this.
|
|
1032
|
-
var tmp2 = new BotModelKey(config.
|
|
1030
|
+
protoOf(BotModelRegistry).hb9 = function (config) {
|
|
1031
|
+
var tmp0 = this.gb9_1;
|
|
1032
|
+
var tmp2 = new BotModelKey(config.db9_1, config.eb9_1);
|
|
1033
1033
|
// Inline function 'kotlin.collections.set' call
|
|
1034
|
-
var value = config.
|
|
1034
|
+
var value = config.fb9_1;
|
|
1035
1035
|
tmp0.g3(tmp2, value);
|
|
1036
1036
|
};
|
|
1037
|
-
protoOf(BotModelRegistry).
|
|
1038
|
-
return this.
|
|
1037
|
+
protoOf(BotModelRegistry).ib9 = function (playersMode, rulesSetType) {
|
|
1038
|
+
return this.gb9_1.v2(new BotModelKey(playersMode, rulesSetType));
|
|
1039
1039
|
};
|
|
1040
|
-
protoOf(BotModelRegistry).
|
|
1040
|
+
protoOf(BotModelRegistry).jb9 = function () {
|
|
1041
1041
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1042
|
-
return !this.
|
|
1042
|
+
return !this.gb9_1.r();
|
|
1043
1043
|
};
|
|
1044
1044
|
function BotModelKey(playersMode, rulesSetType) {
|
|
1045
|
-
this.
|
|
1046
|
-
this.
|
|
1045
|
+
this.kb9_1 = playersMode;
|
|
1046
|
+
this.lb9_1 = rulesSetType;
|
|
1047
1047
|
}
|
|
1048
1048
|
protoOf(BotModelKey).toString = function () {
|
|
1049
|
-
return 'BotModelKey(playersMode=' + this.
|
|
1049
|
+
return 'BotModelKey(playersMode=' + this.kb9_1.toString() + ', rulesSetType=' + this.lb9_1.toString() + ')';
|
|
1050
1050
|
};
|
|
1051
1051
|
protoOf(BotModelKey).hashCode = function () {
|
|
1052
|
-
var result = this.
|
|
1053
|
-
result = imul(result, 31) + this.
|
|
1052
|
+
var result = this.kb9_1.hashCode();
|
|
1053
|
+
result = imul(result, 31) + this.lb9_1.hashCode() | 0;
|
|
1054
1054
|
return result;
|
|
1055
1055
|
};
|
|
1056
1056
|
protoOf(BotModelKey).equals = function (other) {
|
|
@@ -1058,9 +1058,9 @@
|
|
|
1058
1058
|
return true;
|
|
1059
1059
|
if (!(other instanceof BotModelKey))
|
|
1060
1060
|
return false;
|
|
1061
|
-
if (!this.
|
|
1061
|
+
if (!this.kb9_1.equals(other.kb9_1))
|
|
1062
1062
|
return false;
|
|
1063
|
-
if (!this.
|
|
1063
|
+
if (!this.lb9_1.equals(other.lb9_1))
|
|
1064
1064
|
return false;
|
|
1065
1065
|
return true;
|
|
1066
1066
|
};
|
|
@@ -1093,13 +1093,13 @@
|
|
|
1093
1093
|
while (_iterator__ex2g4s_1.u()) {
|
|
1094
1094
|
var element = _iterator__ex2g4s_1.v();
|
|
1095
1095
|
// Inline function 'kotlin.collections.filter' call
|
|
1096
|
-
var tmp0_0 = element.
|
|
1096
|
+
var tmp0_0 = element.e93_1;
|
|
1097
1097
|
// Inline function 'kotlin.collections.filterTo' call
|
|
1098
1098
|
var destination_1 = ArrayList_init_$Create$();
|
|
1099
1099
|
var _iterator__ex2g4s_2 = tmp0_0.t();
|
|
1100
1100
|
while (_iterator__ex2g4s_2.u()) {
|
|
1101
1101
|
var element_0 = _iterator__ex2g4s_2.v();
|
|
1102
|
-
if (element_0.
|
|
1102
|
+
if (element_0.x8k_1 === p) {
|
|
1103
1103
|
destination_1.e1(element_0);
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
@@ -1109,7 +1109,7 @@
|
|
|
1109
1109
|
var _iterator__ex2g4s_3 = destination_1.t();
|
|
1110
1110
|
while (_iterator__ex2g4s_3.u()) {
|
|
1111
1111
|
var item_0 = _iterator__ex2g4s_3.v();
|
|
1112
|
-
var tmp$ret$7 = item_0.
|
|
1112
|
+
var tmp$ret$7 = item_0.z8k_1;
|
|
1113
1113
|
destination_2.e1(tmp$ret$7);
|
|
1114
1114
|
}
|
|
1115
1115
|
var list = destination_2;
|
|
@@ -1181,10 +1181,10 @@
|
|
|
1181
1181
|
var _iterator__ex2g4s_7 = this_1.t();
|
|
1182
1182
|
while (_iterator__ex2g4s_7.u()) {
|
|
1183
1183
|
var item_1 = _iterator__ex2g4s_7.v();
|
|
1184
|
-
var tmp$ret$21 = item_1.
|
|
1184
|
+
var tmp$ret$21 = item_1.e93_1;
|
|
1185
1185
|
destination_4.e1(tmp$ret$21);
|
|
1186
1186
|
}
|
|
1187
|
-
var suitVoids = tmp_1.
|
|
1187
|
+
var suitVoids = tmp_1.cb9(destination_4);
|
|
1188
1188
|
var tmp_2;
|
|
1189
1189
|
if (!(trumpDeclarerId == null) && !(table.currentTrump == null)) {
|
|
1190
1190
|
var circleNumber = trumpTakenInFirstCircle === true ? 1 : 2;
|
|
@@ -1249,7 +1249,7 @@
|
|
|
1249
1249
|
var tmp4_ownCards = player.k7z_1;
|
|
1250
1250
|
var tmp5_trump = table.currentTrump;
|
|
1251
1251
|
var tmp1_safe_receiver = table.cardDeck;
|
|
1252
|
-
var tmp6_trumpCard = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.
|
|
1252
|
+
var tmp6_trumpCard = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h93_1;
|
|
1253
1253
|
var tmp7_isTrumpDeclarer = trumpDeclarerId === playerId;
|
|
1254
1254
|
var tmp_5 = player.k7z_1.g1();
|
|
1255
1255
|
var tmp2_safe_receiver = playedCards.v2(playerId);
|
|
@@ -1259,8 +1259,8 @@
|
|
|
1259
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);
|
|
1260
1260
|
}
|
|
1261
1261
|
function computeLegalActions($this, playerId, table) {
|
|
1262
|
-
var sceneId = table.sceneInfo.
|
|
1263
|
-
var actId = table.sceneInfo.
|
|
1262
|
+
var sceneId = table.sceneInfo.t9g_1;
|
|
1263
|
+
var actId = table.sceneInfo.v9g_1;
|
|
1264
1264
|
var tmp;
|
|
1265
1265
|
if (actId === 'COMBINATION') {
|
|
1266
1266
|
tmp = listOf_0([new AcceptCombinations(true), new AcceptCombinations(false)]);
|
|
@@ -1298,7 +1298,7 @@
|
|
|
1298
1298
|
var _iterator__ex2g4s_0 = this_1.t();
|
|
1299
1299
|
while (_iterator__ex2g4s_0.u()) {
|
|
1300
1300
|
var item_0 = _iterator__ex2g4s_0.v();
|
|
1301
|
-
var tmp$ret$4 = new SimCard(item_0.
|
|
1301
|
+
var tmp$ret$4 = new SimCard(item_0.x8k_1, item_0.z8k_1);
|
|
1302
1302
|
destination_0.e1(tmp$ret$4);
|
|
1303
1303
|
}
|
|
1304
1304
|
var trickCards = destination_0;
|
|
@@ -1327,7 +1327,7 @@
|
|
|
1327
1327
|
}
|
|
1328
1328
|
var partnerPid = tmp_2;
|
|
1329
1329
|
// Inline function 'kotlin.collections.map' call
|
|
1330
|
-
var this_2 = TrickSimulator_instance.
|
|
1330
|
+
var this_2 = TrickSimulator_instance.mb9(player_0.k7z_1, trickCards, trump, table.config.rules, table.config.playersMode, playerId, partnerPid);
|
|
1331
1331
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1332
1332
|
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
|
|
1333
1333
|
var _iterator__ex2g4s_2 = this_2.t();
|
|
@@ -1359,25 +1359,25 @@
|
|
|
1359
1359
|
function mapToClientAction($this, action, playerId, table) {
|
|
1360
1360
|
var tmp;
|
|
1361
1361
|
if (action instanceof SelectSuit) {
|
|
1362
|
-
var tmp4_suit = action.
|
|
1363
|
-
var tmp1_$this = $this.
|
|
1362
|
+
var tmp4_suit = action.yb6_1;
|
|
1363
|
+
var tmp1_$this = $this.pb9_1;
|
|
1364
1364
|
var tmp2_player = getPlayer(table.players, playerId);
|
|
1365
1365
|
var tmp3_round = table.gameInfo.round;
|
|
1366
|
-
var tmp5_tag = tmp1_$this.
|
|
1366
|
+
var tmp5_tag = tmp1_$this.mab(tmp3_round, tmp2_player);
|
|
1367
1367
|
tmp = new SuitChoiceFromClientAction(playerId, true, tmp5_tag, tmp4_suit);
|
|
1368
1368
|
} else {
|
|
1369
1369
|
if (action instanceof PlayCard) {
|
|
1370
|
-
var tmp6_card = action.
|
|
1371
|
-
var tmp7_combinations = findCombinationsForCard($this, action.
|
|
1372
|
-
var tmp8_tag = $this.
|
|
1370
|
+
var tmp6_card = action.wb6_1;
|
|
1371
|
+
var tmp7_combinations = findCombinationsForCard($this, action.wb6_1, playerId, table);
|
|
1372
|
+
var tmp8_tag = $this.pb9_1.nab(table.gameInfo.round, VOID, table.cardsOnTable.g1());
|
|
1373
1373
|
tmp = new CardFromClientAction(playerId, true, tmp8_tag, tmp6_card, tmp7_combinations);
|
|
1374
1374
|
} else {
|
|
1375
1375
|
if (action instanceof AcceptCombinations) {
|
|
1376
|
-
var tmp12_isAccepted = action.
|
|
1377
|
-
var tmp9_$this = $this.
|
|
1376
|
+
var tmp12_isAccepted = action.zb6_1;
|
|
1377
|
+
var tmp9_$this = $this.pb9_1;
|
|
1378
1378
|
var tmp10_round = table.gameInfo.round;
|
|
1379
1379
|
var tmp11_sceneInfo = table.sceneInfo;
|
|
1380
|
-
var tmp13_tag = tmp9_$this.
|
|
1380
|
+
var tmp13_tag = tmp9_$this.lab(tmp11_sceneInfo, tmp10_round);
|
|
1381
1381
|
tmp = new CombinationChoiceFromClientAction(playerId, true, tmp13_tag, tmp12_isAccepted);
|
|
1382
1382
|
} else {
|
|
1383
1383
|
noWhenBranchMatchedException();
|
|
@@ -1438,9 +1438,9 @@
|
|
|
1438
1438
|
return tmp_2;
|
|
1439
1439
|
}
|
|
1440
1440
|
function handleWaitingAct($this, playerId, table) {
|
|
1441
|
-
if (!(table.sceneInfo.
|
|
1441
|
+
if (!(table.sceneInfo.v9g_1 === 'WAITING_ACT'))
|
|
1442
1442
|
return null;
|
|
1443
|
-
var tmp0 = table.sceneInfo.
|
|
1443
|
+
var tmp0 = table.sceneInfo.x9g_1;
|
|
1444
1444
|
var tmp$ret$0;
|
|
1445
1445
|
$l$block: {
|
|
1446
1446
|
// Inline function 'games.jass.logic.data.models.scenes.requireActData' call
|
|
@@ -1451,7 +1451,7 @@
|
|
|
1451
1451
|
throw new MechanicException('Required ' + getKClass(WaitingActData).o() + ', current act is ' + toString(tmp0));
|
|
1452
1452
|
}
|
|
1453
1453
|
var waitingActData = tmp$ret$0;
|
|
1454
|
-
var tmp0_elvis_lhs = waitingActData.
|
|
1454
|
+
var tmp0_elvis_lhs = waitingActData.b8m_1;
|
|
1455
1455
|
var tmp;
|
|
1456
1456
|
if (tmp0_elvis_lhs == null) {
|
|
1457
1457
|
return null;
|
|
@@ -1463,7 +1463,7 @@
|
|
|
1463
1463
|
if (requestPayload instanceof CardDeckRequest) {
|
|
1464
1464
|
// Inline function 'kotlin.collections.List' call
|
|
1465
1465
|
// Inline function 'kotlin.collections.MutableList' call
|
|
1466
|
-
var size = requestPayload.
|
|
1466
|
+
var size = requestPayload.z8l_1;
|
|
1467
1467
|
var list = ArrayList_init_$Create$_0(size);
|
|
1468
1468
|
// Inline function 'kotlin.repeat' call
|
|
1469
1469
|
var inductionVariable = 0;
|
|
@@ -1471,11 +1471,11 @@
|
|
|
1471
1471
|
do {
|
|
1472
1472
|
var index = inductionVariable;
|
|
1473
1473
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1474
|
-
var tmp$ret$1 = Companion_instance.
|
|
1474
|
+
var tmp$ret$1 = Companion_instance.d97($this.ob9_1.gab());
|
|
1475
1475
|
list.e1(tmp$ret$1);
|
|
1476
1476
|
}
|
|
1477
1477
|
while (inductionVariable < size);
|
|
1478
|
-
var tmp3_tag = $this.
|
|
1478
|
+
var tmp3_tag = $this.pb9_1.iab(table.sceneInfo.t9g_1, table.gameInfo.round);
|
|
1479
1479
|
tmp_0 = new RequestedCardDecksFromClientAction(list, playerId, true, tmp3_tag);
|
|
1480
1480
|
} else {
|
|
1481
1481
|
noWhenBranchMatchedException();
|
|
@@ -1502,12 +1502,12 @@
|
|
|
1502
1502
|
var playerIndex = tmp$ret$1;
|
|
1503
1503
|
var partnerIndex = (playerIndex + 2 | 0) % table.players.g1() | 0;
|
|
1504
1504
|
var partnerId = table.players.h1(partnerIndex).playerId;
|
|
1505
|
-
var tmp0_tag = $this.
|
|
1505
|
+
var tmp0_tag = $this.pb9_1.jab(table.gameInfo.round);
|
|
1506
1506
|
return new PartnerSelectedFromClientAction(playerId, true, tmp0_tag, partnerId);
|
|
1507
1507
|
}
|
|
1508
1508
|
function handleCalcPoints($this, playerId, table) {
|
|
1509
|
-
if ($this.
|
|
1510
|
-
var tmp0 = table.sceneInfo.
|
|
1509
|
+
if ($this.qb9_1 === table.gameInfo.gameNumber) {
|
|
1510
|
+
var tmp0 = table.sceneInfo.w9g_1;
|
|
1511
1511
|
var tmp$ret$0;
|
|
1512
1512
|
$l$block: {
|
|
1513
1513
|
// Inline function 'games.jass.logic.data.models.scenes.requireSceneData' call
|
|
@@ -1519,29 +1519,29 @@
|
|
|
1519
1519
|
}
|
|
1520
1520
|
var sceneData = tmp$ret$0;
|
|
1521
1521
|
// Inline function 'kotlin.collections.orEmpty' call
|
|
1522
|
-
var tmp0_elvis_lhs = sceneData.
|
|
1522
|
+
var tmp0_elvis_lhs = sceneData.w8m_1;
|
|
1523
1523
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1524
1524
|
if (!(tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs).r()) {
|
|
1525
1525
|
return new ExitFromClientAction(playerId, true);
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
|
-
return new PlayerReadyFromClientAction(playerId, true, $this.
|
|
1528
|
+
return new PlayerReadyFromClientAction(playerId, true, $this.pb9_1.kab(table.gameInfo.round));
|
|
1529
1529
|
}
|
|
1530
1530
|
function BotPolicyAnswerProvider(policies, dealerInteractor, tagProvider, exitAfterGameNumber) {
|
|
1531
1531
|
exitAfterGameNumber = exitAfterGameNumber === VOID ? null : exitAfterGameNumber;
|
|
1532
|
-
this.
|
|
1533
|
-
this.
|
|
1534
|
-
this.
|
|
1535
|
-
this.
|
|
1532
|
+
this.nb9_1 = policies;
|
|
1533
|
+
this.ob9_1 = dealerInteractor;
|
|
1534
|
+
this.pb9_1 = tagProvider;
|
|
1535
|
+
this.qb9_1 = exitAfterGameNumber;
|
|
1536
1536
|
}
|
|
1537
|
-
protoOf(BotPolicyAnswerProvider).
|
|
1537
|
+
protoOf(BotPolicyAnswerProvider).xar = function (playerId, table) {
|
|
1538
1538
|
var waitingAction = handleWaitingAct(this, playerId, table);
|
|
1539
1539
|
if (!(waitingAction == null))
|
|
1540
1540
|
return waitingAction;
|
|
1541
|
-
if (get_isCalcPointScene(table.sceneInfo.
|
|
1541
|
+
if (get_isCalcPointScene(table.sceneInfo.t9g_1)) {
|
|
1542
1542
|
return handleCalcPoints(this, playerId, table);
|
|
1543
1543
|
}
|
|
1544
|
-
if (get_isChoosePartnerScene(table.sceneInfo.
|
|
1544
|
+
if (get_isChoosePartnerScene(table.sceneInfo.t9g_1)) {
|
|
1545
1545
|
return handleChoosePartner(this, playerId, table);
|
|
1546
1546
|
}
|
|
1547
1547
|
var tmp0 = table.players;
|
|
@@ -1561,32 +1561,32 @@
|
|
|
1561
1561
|
tmp$ret$1 = -1;
|
|
1562
1562
|
}
|
|
1563
1563
|
var seatIndex = tmp$ret$1;
|
|
1564
|
-
var policy = this.
|
|
1564
|
+
var policy = this.nb9_1[seatIndex % this.nb9_1.length | 0];
|
|
1565
1565
|
var state = mapToBotState(this, playerId, table);
|
|
1566
1566
|
var legalActions = computeLegalActions(this, playerId, table);
|
|
1567
|
-
var chosen = policy.
|
|
1567
|
+
var chosen = policy.rb9(state, legalActions);
|
|
1568
1568
|
return mapToClientAction(this, chosen, playerId, table);
|
|
1569
1569
|
};
|
|
1570
1570
|
function Companion_0() {
|
|
1571
|
-
this.
|
|
1571
|
+
this.sb9_1 = 'HeuristicBotAnswerProvider';
|
|
1572
1572
|
}
|
|
1573
1573
|
var Companion_instance_2;
|
|
1574
1574
|
function Companion_getInstance_0() {
|
|
1575
1575
|
return Companion_instance_2;
|
|
1576
1576
|
}
|
|
1577
1577
|
function HeuristicBotAnswerProvider(dealerInteractor, tagProvider, logger) {
|
|
1578
|
-
this.
|
|
1579
|
-
this.
|
|
1580
|
-
this.
|
|
1581
|
-
this.
|
|
1578
|
+
this.tb9_1 = dealerInteractor;
|
|
1579
|
+
this.ub9_1 = tagProvider;
|
|
1580
|
+
this.vb9_1 = logger;
|
|
1581
|
+
this.wb9_1 = null;
|
|
1582
1582
|
}
|
|
1583
|
-
protoOf(HeuristicBotAnswerProvider).
|
|
1584
|
-
var tmp0_elvis_lhs = this.
|
|
1583
|
+
protoOf(HeuristicBotAnswerProvider).xar = function (playerId, table) {
|
|
1584
|
+
var tmp0_elvis_lhs = this.wb9_1;
|
|
1585
1585
|
var tmp;
|
|
1586
1586
|
if (tmp0_elvis_lhs == null) {
|
|
1587
1587
|
// Inline function 'kotlin.run' call
|
|
1588
1588
|
var playersMode = table.config.playersMode;
|
|
1589
|
-
this.
|
|
1589
|
+
this.vb9_1.d('HeuristicBotAnswerProvider', 'Using HeuristicBotPolicy for mode=' + playersMode.z_1 + '.');
|
|
1590
1590
|
var policy = new HeuristicBotPolicy();
|
|
1591
1591
|
var tmp_0 = 0;
|
|
1592
1592
|
var tmp_1 = playersMode.count;
|
|
@@ -1597,37 +1597,37 @@
|
|
|
1597
1597
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1598
1598
|
}
|
|
1599
1599
|
// Inline function 'kotlin.also' call
|
|
1600
|
-
var this_0 = new BotPolicyAnswerProvider(tmp_2, this.
|
|
1601
|
-
this.
|
|
1600
|
+
var this_0 = new BotPolicyAnswerProvider(tmp_2, this.tb9_1, this.ub9_1);
|
|
1601
|
+
this.wb9_1 = this_0;
|
|
1602
1602
|
tmp = this_0;
|
|
1603
1603
|
} else {
|
|
1604
1604
|
tmp = tmp0_elvis_lhs;
|
|
1605
1605
|
}
|
|
1606
1606
|
var answerProvider = tmp;
|
|
1607
|
-
return answerProvider.
|
|
1607
|
+
return answerProvider.xar(playerId, table);
|
|
1608
1608
|
};
|
|
1609
1609
|
function LegacyBotAnswerProvider(playerAnswerInteractor, botConfig) {
|
|
1610
|
-
this.
|
|
1611
|
-
this.
|
|
1610
|
+
this.xb9_1 = playerAnswerInteractor;
|
|
1611
|
+
this.yb9_1 = botConfig;
|
|
1612
1612
|
}
|
|
1613
|
-
protoOf(LegacyBotAnswerProvider).
|
|
1614
|
-
return this.
|
|
1613
|
+
protoOf(LegacyBotAnswerProvider).xar = function (playerId, table) {
|
|
1614
|
+
return this.xb9_1.yaa(playerId, table, this.yb9_1);
|
|
1615
1615
|
};
|
|
1616
1616
|
function getOrCreatePolicy($this, playersMode, rulesSetType) {
|
|
1617
1617
|
var cacheKey = rulesSetType.value + '_' + playersMode.z_1;
|
|
1618
1618
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1619
|
-
var this_0 = $this.
|
|
1619
|
+
var this_0 = $this.dba_1;
|
|
1620
1620
|
var value = this_0.v2(cacheKey);
|
|
1621
1621
|
var tmp;
|
|
1622
1622
|
if (value == null) {
|
|
1623
|
-
var tmp0_safe_receiver = $this.
|
|
1624
|
-
var modelBytes = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1623
|
+
var tmp0_safe_receiver = $this.zb9_1;
|
|
1624
|
+
var modelBytes = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ib9(playersMode, rulesSetType);
|
|
1625
1625
|
var tmp_0;
|
|
1626
1626
|
if (!(modelBytes == null)) {
|
|
1627
|
-
$this.
|
|
1627
|
+
$this.cba_1.d('PimcBotAnswerProvider', 'Using PIMC+belief for rulesSet=' + rulesSetType.value + ', mode=' + playersMode.z_1 + '.');
|
|
1628
1628
|
tmp_0 = createPimcPolicy($this, modelBytes, playersMode);
|
|
1629
1629
|
} else {
|
|
1630
|
-
$this.
|
|
1630
|
+
$this.cba_1.d('PimcBotAnswerProvider', 'Using PIMC+uniform for rulesSet=' + rulesSetType.value + ', ' + ('mode=' + playersMode.z_1 + ' (no model \u2014 uniform sampling).'));
|
|
1631
1631
|
tmp_0 = createUniformPimcPolicy($this, playersMode);
|
|
1632
1632
|
}
|
|
1633
1633
|
var answer = tmp_0;
|
|
@@ -1642,7 +1642,7 @@
|
|
|
1642
1642
|
var inferenceEngine = new PureKotlinInferenceEngine();
|
|
1643
1643
|
var encoder = new BeliefFeatureEncoder(playersMode);
|
|
1644
1644
|
var beliefNetwork = new CardBeliefNetwork(inferenceEngine, encoder, playersMode);
|
|
1645
|
-
beliefNetwork.
|
|
1645
|
+
beliefNetwork.ub8(modelBytes);
|
|
1646
1646
|
var rolloutPolicy = new RolloutPolicy();
|
|
1647
1647
|
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, new PimcConfig());
|
|
1648
1648
|
return PimcBotPolicy_init_$Create$(pimcEngine);
|
|
@@ -1652,13 +1652,13 @@
|
|
|
1652
1652
|
var encoder = new BeliefFeatureEncoder(playersMode);
|
|
1653
1653
|
var beliefNetwork = new CardBeliefNetwork(inferenceEngine, encoder, playersMode);
|
|
1654
1654
|
var rolloutPolicy = new RolloutPolicy();
|
|
1655
|
-
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, Companion_getInstance_1().
|
|
1655
|
+
var pimcEngine = new PimcEngine(beliefNetwork, rolloutPolicy, Companion_getInstance_1().gba_1);
|
|
1656
1656
|
return PimcBotPolicy_init_$Create$(pimcEngine);
|
|
1657
1657
|
}
|
|
1658
1658
|
function Companion_1() {
|
|
1659
1659
|
Companion_instance_3 = this;
|
|
1660
|
-
this.
|
|
1661
|
-
this.
|
|
1660
|
+
this.fba_1 = 'PimcBotAnswerProvider';
|
|
1661
|
+
this.gba_1 = new PimcConfig(200);
|
|
1662
1662
|
}
|
|
1663
1663
|
var Companion_instance_3;
|
|
1664
1664
|
function Companion_getInstance_1() {
|
|
@@ -1669,23 +1669,23 @@
|
|
|
1669
1669
|
function PimcBotAnswerProvider(registry, dealerInteractor, tagProvider, logger) {
|
|
1670
1670
|
Companion_getInstance_1();
|
|
1671
1671
|
registry = registry === VOID ? null : registry;
|
|
1672
|
-
this.
|
|
1673
|
-
this.
|
|
1674
|
-
this.
|
|
1675
|
-
this.
|
|
1672
|
+
this.zb9_1 = registry;
|
|
1673
|
+
this.aba_1 = dealerInteractor;
|
|
1674
|
+
this.bba_1 = tagProvider;
|
|
1675
|
+
this.cba_1 = logger;
|
|
1676
1676
|
var tmp = this;
|
|
1677
1677
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1678
|
-
tmp.
|
|
1678
|
+
tmp.dba_1 = LinkedHashMap_init_$Create$();
|
|
1679
1679
|
var tmp_0 = this;
|
|
1680
1680
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
1681
|
-
tmp_0.
|
|
1681
|
+
tmp_0.eba_1 = LinkedHashMap_init_$Create$();
|
|
1682
1682
|
}
|
|
1683
|
-
protoOf(PimcBotAnswerProvider).
|
|
1683
|
+
protoOf(PimcBotAnswerProvider).xar = function (playerId, table) {
|
|
1684
1684
|
var playersMode = table.config.playersMode;
|
|
1685
1685
|
var rulesSetType = table.config.rulesSetType;
|
|
1686
1686
|
var cacheKey = rulesSetType.value + '_' + playersMode.z_1;
|
|
1687
1687
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
1688
|
-
var this_0 = this.
|
|
1688
|
+
var this_0 = this.eba_1;
|
|
1689
1689
|
var value = this_0.v2(cacheKey);
|
|
1690
1690
|
var tmp;
|
|
1691
1691
|
if (value == null) {
|
|
@@ -1699,14 +1699,14 @@
|
|
|
1699
1699
|
tmp_0 = tmp_0 + 1 | 0;
|
|
1700
1700
|
}
|
|
1701
1701
|
var policies = tmp_2;
|
|
1702
|
-
var answer = new BotPolicyAnswerProvider(policies, this.
|
|
1702
|
+
var answer = new BotPolicyAnswerProvider(policies, this.aba_1, this.bba_1);
|
|
1703
1703
|
this_0.g3(cacheKey, answer);
|
|
1704
1704
|
tmp = answer;
|
|
1705
1705
|
} else {
|
|
1706
1706
|
tmp = value;
|
|
1707
1707
|
}
|
|
1708
1708
|
var provider = tmp;
|
|
1709
|
-
return provider.
|
|
1709
|
+
return provider.xar(playerId, table);
|
|
1710
1710
|
};
|
|
1711
1711
|
var Activation_RELU_instance;
|
|
1712
1712
|
var Activation_NONE_instance;
|
|
@@ -1719,43 +1719,43 @@
|
|
|
1719
1719
|
Activation_NONE_instance = new Activation('NONE', 1);
|
|
1720
1720
|
}
|
|
1721
1721
|
function forward($this, layer, input) {
|
|
1722
|
-
var out = new Float32Array(layer.
|
|
1722
|
+
var out = new Float32Array(layer.iba_1);
|
|
1723
1723
|
var inductionVariable = 0;
|
|
1724
|
-
var last = layer.
|
|
1724
|
+
var last = layer.iba_1;
|
|
1725
1725
|
if (inductionVariable < last)
|
|
1726
1726
|
do {
|
|
1727
1727
|
var j = inductionVariable;
|
|
1728
1728
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1729
|
-
var sum = layer.
|
|
1729
|
+
var sum = layer.kba_1[j];
|
|
1730
1730
|
var inductionVariable_0 = 0;
|
|
1731
|
-
var last_0 = layer.
|
|
1731
|
+
var last_0 = layer.hba_1;
|
|
1732
1732
|
if (inductionVariable_0 < last_0)
|
|
1733
1733
|
do {
|
|
1734
1734
|
var i = inductionVariable_0;
|
|
1735
1735
|
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1736
|
-
sum = sum + input[i] * layer.
|
|
1736
|
+
sum = sum + input[i] * layer.jba_1[imul(i, layer.iba_1) + j | 0];
|
|
1737
1737
|
}
|
|
1738
1738
|
while (inductionVariable_0 < last_0);
|
|
1739
1739
|
out[j] = sum;
|
|
1740
1740
|
}
|
|
1741
1741
|
while (inductionVariable < last);
|
|
1742
|
-
var bn = layer.
|
|
1742
|
+
var bn = layer.lba_1;
|
|
1743
1743
|
if (!(bn == null)) {
|
|
1744
1744
|
var inductionVariable_1 = 0;
|
|
1745
|
-
var last_1 = layer.
|
|
1745
|
+
var last_1 = layer.iba_1;
|
|
1746
1746
|
if (inductionVariable_1 < last_1)
|
|
1747
1747
|
do {
|
|
1748
1748
|
var j_0 = inductionVariable_1;
|
|
1749
1749
|
inductionVariable_1 = inductionVariable_1 + 1 | 0;
|
|
1750
|
-
var normalized = (out[j_0] - bn.
|
|
1751
|
-
out[j_0] = bn.
|
|
1750
|
+
var normalized = (out[j_0] - bn.pba_1[j_0]) / sqrt(bn.qba_1[j_0] + 1.0E-5);
|
|
1751
|
+
out[j_0] = bn.nba_1[j_0] * normalized + bn.oba_1[j_0];
|
|
1752
1752
|
}
|
|
1753
1753
|
while (inductionVariable_1 < last_1);
|
|
1754
1754
|
}
|
|
1755
|
-
switch (layer.
|
|
1755
|
+
switch (layer.mba_1.a1_1) {
|
|
1756
1756
|
case 0:
|
|
1757
1757
|
var inductionVariable_2 = 0;
|
|
1758
|
-
var last_2 = layer.
|
|
1758
|
+
var last_2 = layer.iba_1;
|
|
1759
1759
|
if (inductionVariable_2 < last_2)
|
|
1760
1760
|
do {
|
|
1761
1761
|
var j_1 = inductionVariable_2;
|
|
@@ -1775,23 +1775,23 @@
|
|
|
1775
1775
|
return out;
|
|
1776
1776
|
}
|
|
1777
1777
|
function Layer(inDim, outDim, weight, bias, batchNorm, activation) {
|
|
1778
|
-
this.
|
|
1779
|
-
this.
|
|
1780
|
-
this.
|
|
1781
|
-
this.
|
|
1782
|
-
this.
|
|
1783
|
-
this.
|
|
1778
|
+
this.hba_1 = inDim;
|
|
1779
|
+
this.iba_1 = outDim;
|
|
1780
|
+
this.jba_1 = weight;
|
|
1781
|
+
this.kba_1 = bias;
|
|
1782
|
+
this.lba_1 = batchNorm;
|
|
1783
|
+
this.mba_1 = activation;
|
|
1784
1784
|
}
|
|
1785
1785
|
protoOf(Layer).toString = function () {
|
|
1786
|
-
return 'Layer(inDim=' + this.
|
|
1786
|
+
return 'Layer(inDim=' + this.hba_1 + ', outDim=' + this.iba_1 + ', weight=' + toString_0(this.jba_1) + ', bias=' + toString_0(this.kba_1) + ', batchNorm=' + toString(this.lba_1) + ', activation=' + this.mba_1.toString() + ')';
|
|
1787
1787
|
};
|
|
1788
1788
|
protoOf(Layer).hashCode = function () {
|
|
1789
|
-
var result = this.
|
|
1790
|
-
result = imul(result, 31) + this.
|
|
1791
|
-
result = imul(result, 31) + hashCode(this.
|
|
1792
|
-
result = imul(result, 31) + hashCode(this.
|
|
1793
|
-
result = imul(result, 31) + (this.
|
|
1794
|
-
result = imul(result, 31) + this.
|
|
1789
|
+
var result = this.hba_1;
|
|
1790
|
+
result = imul(result, 31) + this.iba_1 | 0;
|
|
1791
|
+
result = imul(result, 31) + hashCode(this.jba_1) | 0;
|
|
1792
|
+
result = imul(result, 31) + hashCode(this.kba_1) | 0;
|
|
1793
|
+
result = imul(result, 31) + (this.lba_1 == null ? 0 : this.lba_1.hashCode()) | 0;
|
|
1794
|
+
result = imul(result, 31) + this.mba_1.hashCode() | 0;
|
|
1795
1795
|
return result;
|
|
1796
1796
|
};
|
|
1797
1797
|
protoOf(Layer).equals = function (other) {
|
|
@@ -1799,34 +1799,34 @@
|
|
|
1799
1799
|
return true;
|
|
1800
1800
|
if (!(other instanceof Layer))
|
|
1801
1801
|
return false;
|
|
1802
|
-
if (!(this.
|
|
1802
|
+
if (!(this.hba_1 === other.hba_1))
|
|
1803
1803
|
return false;
|
|
1804
|
-
if (!(this.
|
|
1804
|
+
if (!(this.iba_1 === other.iba_1))
|
|
1805
1805
|
return false;
|
|
1806
|
-
if (!equals(this.
|
|
1806
|
+
if (!equals(this.jba_1, other.jba_1))
|
|
1807
1807
|
return false;
|
|
1808
|
-
if (!equals(this.
|
|
1808
|
+
if (!equals(this.kba_1, other.kba_1))
|
|
1809
1809
|
return false;
|
|
1810
|
-
if (!equals(this.
|
|
1810
|
+
if (!equals(this.lba_1, other.lba_1))
|
|
1811
1811
|
return false;
|
|
1812
|
-
if (!this.
|
|
1812
|
+
if (!this.mba_1.equals(other.mba_1))
|
|
1813
1813
|
return false;
|
|
1814
1814
|
return true;
|
|
1815
1815
|
};
|
|
1816
1816
|
function BatchNormParams(gamma, beta, runningMean, runningVar) {
|
|
1817
|
-
this.
|
|
1818
|
-
this.
|
|
1819
|
-
this.
|
|
1820
|
-
this.
|
|
1817
|
+
this.nba_1 = gamma;
|
|
1818
|
+
this.oba_1 = beta;
|
|
1819
|
+
this.pba_1 = runningMean;
|
|
1820
|
+
this.qba_1 = runningVar;
|
|
1821
1821
|
}
|
|
1822
1822
|
protoOf(BatchNormParams).toString = function () {
|
|
1823
|
-
return 'BatchNormParams(gamma=' + toString_0(this.
|
|
1823
|
+
return 'BatchNormParams(gamma=' + toString_0(this.nba_1) + ', beta=' + toString_0(this.oba_1) + ', runningMean=' + toString_0(this.pba_1) + ', runningVar=' + toString_0(this.qba_1) + ')';
|
|
1824
1824
|
};
|
|
1825
1825
|
protoOf(BatchNormParams).hashCode = function () {
|
|
1826
|
-
var result = hashCode(this.
|
|
1827
|
-
result = imul(result, 31) + hashCode(this.
|
|
1828
|
-
result = imul(result, 31) + hashCode(this.
|
|
1829
|
-
result = imul(result, 31) + hashCode(this.
|
|
1826
|
+
var result = hashCode(this.nba_1);
|
|
1827
|
+
result = imul(result, 31) + hashCode(this.oba_1) | 0;
|
|
1828
|
+
result = imul(result, 31) + hashCode(this.pba_1) | 0;
|
|
1829
|
+
result = imul(result, 31) + hashCode(this.qba_1) | 0;
|
|
1830
1830
|
return result;
|
|
1831
1831
|
};
|
|
1832
1832
|
protoOf(BatchNormParams).equals = function (other) {
|
|
@@ -1834,13 +1834,13 @@
|
|
|
1834
1834
|
return true;
|
|
1835
1835
|
if (!(other instanceof BatchNormParams))
|
|
1836
1836
|
return false;
|
|
1837
|
-
if (!equals(this.
|
|
1837
|
+
if (!equals(this.nba_1, other.nba_1))
|
|
1838
1838
|
return false;
|
|
1839
|
-
if (!equals(this.
|
|
1839
|
+
if (!equals(this.oba_1, other.oba_1))
|
|
1840
1840
|
return false;
|
|
1841
|
-
if (!equals(this.
|
|
1841
|
+
if (!equals(this.pba_1, other.pba_1))
|
|
1842
1842
|
return false;
|
|
1843
|
-
if (!equals(this.
|
|
1843
|
+
if (!equals(this.qba_1, other.qba_1))
|
|
1844
1844
|
return false;
|
|
1845
1845
|
return true;
|
|
1846
1846
|
};
|
|
@@ -1848,9 +1848,9 @@
|
|
|
1848
1848
|
Enum.call(this, name, ordinal);
|
|
1849
1849
|
}
|
|
1850
1850
|
function Companion_2() {
|
|
1851
|
-
this.
|
|
1851
|
+
this.xb8_1 = 1.0E-5;
|
|
1852
1852
|
}
|
|
1853
|
-
protoOf(Companion_2).
|
|
1853
|
+
protoOf(Companion_2).yb8 = function (logits) {
|
|
1854
1854
|
var max_0 = max(logits);
|
|
1855
1855
|
var tmp = 0;
|
|
1856
1856
|
var tmp_0 = logits.length;
|
|
@@ -1890,16 +1890,16 @@
|
|
|
1890
1890
|
return Activation_NONE_instance;
|
|
1891
1891
|
}
|
|
1892
1892
|
function PureKotlinInferenceEngine() {
|
|
1893
|
-
this.
|
|
1893
|
+
this.rba_1 = emptyList();
|
|
1894
1894
|
}
|
|
1895
|
-
protoOf(PureKotlinInferenceEngine).
|
|
1895
|
+
protoOf(PureKotlinInferenceEngine).ub8 = function (modelBytes) {
|
|
1896
1896
|
var buf = new ByteArrayReader(modelBytes);
|
|
1897
|
-
var layerCount = buf.
|
|
1897
|
+
var layerCount = buf.uba();
|
|
1898
1898
|
var tmp = 0;
|
|
1899
1899
|
var tmp_0 = layerCount + 1 | 0;
|
|
1900
1900
|
var tmp_1 = new Int32Array(tmp_0);
|
|
1901
1901
|
while (tmp < tmp_0) {
|
|
1902
|
-
tmp_1[tmp] = buf.
|
|
1902
|
+
tmp_1[tmp] = buf.uba();
|
|
1903
1903
|
tmp = tmp + 1 | 0;
|
|
1904
1904
|
}
|
|
1905
1905
|
var sizes = tmp_1;
|
|
@@ -1913,11 +1913,11 @@
|
|
|
1913
1913
|
var inDim = sizes[i];
|
|
1914
1914
|
var outDim = sizes[i + 1 | 0];
|
|
1915
1915
|
var isHidden = i < (layerCount - 1 | 0);
|
|
1916
|
-
var weight = buf.
|
|
1917
|
-
var bias = buf.
|
|
1916
|
+
var weight = buf.vba(imul(inDim, outDim));
|
|
1917
|
+
var bias = buf.vba(outDim);
|
|
1918
1918
|
var tmp_2;
|
|
1919
1919
|
if (isHidden) {
|
|
1920
|
-
tmp_2 = new BatchNormParams(buf.
|
|
1920
|
+
tmp_2 = new BatchNormParams(buf.vba(outDim), buf.vba(outDim), buf.vba(outDim), buf.vba(outDim));
|
|
1921
1921
|
} else {
|
|
1922
1922
|
tmp_2 = null;
|
|
1923
1923
|
}
|
|
@@ -1927,17 +1927,17 @@
|
|
|
1927
1927
|
parsed.e1(element);
|
|
1928
1928
|
}
|
|
1929
1929
|
while (inductionVariable < layerCount);
|
|
1930
|
-
this.
|
|
1930
|
+
this.rba_1 = parsed;
|
|
1931
1931
|
};
|
|
1932
|
-
protoOf(PureKotlinInferenceEngine).
|
|
1932
|
+
protoOf(PureKotlinInferenceEngine).wb8 = function (input) {
|
|
1933
1933
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1934
1934
|
// Inline function 'kotlin.check' call
|
|
1935
|
-
if (!!this.
|
|
1935
|
+
if (!!this.rba_1.r()) {
|
|
1936
1936
|
var message = 'Model not loaded. Call loadModel() first.';
|
|
1937
1937
|
throw IllegalStateException_init_$Create$(toString_0(message));
|
|
1938
1938
|
}
|
|
1939
1939
|
var x = input;
|
|
1940
|
-
var _iterator__ex2g4s = this.
|
|
1940
|
+
var _iterator__ex2g4s = this.rba_1.t();
|
|
1941
1941
|
while (_iterator__ex2g4s.u()) {
|
|
1942
1942
|
var layer = _iterator__ex2g4s.v();
|
|
1943
1943
|
x = forward(this, layer, x);
|
|
@@ -1945,34 +1945,34 @@
|
|
|
1945
1945
|
return x;
|
|
1946
1946
|
};
|
|
1947
1947
|
function ByteArrayReader(data) {
|
|
1948
|
-
this.
|
|
1949
|
-
this.
|
|
1950
|
-
}
|
|
1951
|
-
protoOf(ByteArrayReader).
|
|
1952
|
-
var _unary__edvuaz = this.
|
|
1953
|
-
this.
|
|
1954
|
-
var b0 = this.
|
|
1955
|
-
var _unary__edvuaz_0 = this.
|
|
1956
|
-
this.
|
|
1957
|
-
var b1 = this.
|
|
1958
|
-
var _unary__edvuaz_1 = this.
|
|
1959
|
-
this.
|
|
1960
|
-
var b2 = this.
|
|
1961
|
-
var _unary__edvuaz_2 = this.
|
|
1962
|
-
this.
|
|
1963
|
-
var b3 = this.
|
|
1948
|
+
this.sba_1 = data;
|
|
1949
|
+
this.tba_1 = 0;
|
|
1950
|
+
}
|
|
1951
|
+
protoOf(ByteArrayReader).uba = function () {
|
|
1952
|
+
var _unary__edvuaz = this.tba_1;
|
|
1953
|
+
this.tba_1 = _unary__edvuaz + 1 | 0;
|
|
1954
|
+
var b0 = this.sba_1[_unary__edvuaz] & 255;
|
|
1955
|
+
var _unary__edvuaz_0 = this.tba_1;
|
|
1956
|
+
this.tba_1 = _unary__edvuaz_0 + 1 | 0;
|
|
1957
|
+
var b1 = this.sba_1[_unary__edvuaz_0] & 255;
|
|
1958
|
+
var _unary__edvuaz_1 = this.tba_1;
|
|
1959
|
+
this.tba_1 = _unary__edvuaz_1 + 1 | 0;
|
|
1960
|
+
var b2 = this.sba_1[_unary__edvuaz_1] & 255;
|
|
1961
|
+
var _unary__edvuaz_2 = this.tba_1;
|
|
1962
|
+
this.tba_1 = _unary__edvuaz_2 + 1 | 0;
|
|
1963
|
+
var b3 = this.sba_1[_unary__edvuaz_2] & 255;
|
|
1964
1964
|
return b0 | b1 << 8 | b2 << 16 | b3 << 24;
|
|
1965
1965
|
};
|
|
1966
|
-
protoOf(ByteArrayReader).
|
|
1966
|
+
protoOf(ByteArrayReader).wba = function () {
|
|
1967
1967
|
// Inline function 'kotlin.fromBits' call
|
|
1968
|
-
var bits = this.
|
|
1968
|
+
var bits = this.uba();
|
|
1969
1969
|
return floatFromBits(bits);
|
|
1970
1970
|
};
|
|
1971
|
-
protoOf(ByteArrayReader).
|
|
1971
|
+
protoOf(ByteArrayReader).vba = function (size) {
|
|
1972
1972
|
var tmp = 0;
|
|
1973
1973
|
var tmp_0 = new Float32Array(size);
|
|
1974
1974
|
while (tmp < size) {
|
|
1975
|
-
tmp_0[tmp] = this.
|
|
1975
|
+
tmp_0[tmp] = this.wba();
|
|
1976
1976
|
tmp = tmp + 1 | 0;
|
|
1977
1977
|
}
|
|
1978
1978
|
return tmp_0;
|
|
@@ -1982,15 +1982,15 @@
|
|
|
1982
1982
|
return Math.sqrt(x);
|
|
1983
1983
|
}
|
|
1984
1984
|
function finishTrick($this, state) {
|
|
1985
|
-
var playersInOrder = Companion_instance_5.
|
|
1985
|
+
var playersInOrder = Companion_instance_5.ibb(state.xba_1, state.gbb_1);
|
|
1986
1986
|
// Inline function 'kotlin.collections.map' call
|
|
1987
|
-
var this_0 = state.
|
|
1987
|
+
var this_0 = state.abb_1;
|
|
1988
1988
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1989
1989
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1990
1990
|
var _iterator__ex2g4s = this_0.t();
|
|
1991
1991
|
while (_iterator__ex2g4s.u()) {
|
|
1992
1992
|
var item = _iterator__ex2g4s.v();
|
|
1993
|
-
var tmp$ret$0 = item.
|
|
1993
|
+
var tmp$ret$0 = item.jbb_1;
|
|
1994
1994
|
destination.e1(tmp$ret$0);
|
|
1995
1995
|
}
|
|
1996
1996
|
var alreadyPlayed = toSet(destination);
|
|
@@ -2004,8 +2004,8 @@
|
|
|
2004
2004
|
resolveTrickAndAdvance($this, state);
|
|
2005
2005
|
}
|
|
2006
2006
|
function playFullTrick($this, state) {
|
|
2007
|
-
state.
|
|
2008
|
-
var playersInOrder = Companion_instance_5.
|
|
2007
|
+
state.abb_1.b3();
|
|
2008
|
+
var playersInOrder = Companion_instance_5.ibb(state.xba_1, state.gbb_1);
|
|
2009
2009
|
var _iterator__ex2g4s = playersInOrder.t();
|
|
2010
2010
|
while (_iterator__ex2g4s.u()) {
|
|
2011
2011
|
var pid = _iterator__ex2g4s.v();
|
|
@@ -2014,7 +2014,7 @@
|
|
|
2014
2014
|
resolveTrickAndAdvance($this, state);
|
|
2015
2015
|
}
|
|
2016
2016
|
function playCard($this, state, playerId) {
|
|
2017
|
-
var tmp0_elvis_lhs = state.
|
|
2017
|
+
var tmp0_elvis_lhs = state.yba_1.v2(playerId);
|
|
2018
2018
|
var tmp;
|
|
2019
2019
|
if (tmp0_elvis_lhs == null) {
|
|
2020
2020
|
return Unit_instance;
|
|
@@ -2024,15 +2024,15 @@
|
|
|
2024
2024
|
var hand = tmp;
|
|
2025
2025
|
if (hand.r())
|
|
2026
2026
|
return Unit_instance;
|
|
2027
|
-
var partnerPid = Companion_instance_5.
|
|
2027
|
+
var partnerPid = Companion_instance_5.lbb(playerId, state.xba_1, state.dbb_1);
|
|
2028
2028
|
var partnerWinning = isPartnerWinning($this, state, partnerPid);
|
|
2029
|
-
var legalCards = TrickSimulator_instance.
|
|
2030
|
-
var useRandom = $this.
|
|
2029
|
+
var legalCards = TrickSimulator_instance.mb9(hand, state.abb_1, state.zba_1, state.ebb_1, state.dbb_1, playerId, partnerPid);
|
|
2030
|
+
var useRandom = $this.obb_1 && !isFocalTeam($this, playerId, state);
|
|
2031
2031
|
var isFocal = isFocalTeam($this, playerId, state);
|
|
2032
2032
|
var tmp_0;
|
|
2033
2033
|
if (!useRandom && isFocal) {
|
|
2034
2034
|
// Inline function 'kotlin.collections.filter' call
|
|
2035
|
-
var tmp0 = state.
|
|
2035
|
+
var tmp0 = state.yba_1.m1();
|
|
2036
2036
|
// Inline function 'kotlin.collections.filterTo' call
|
|
2037
2037
|
var destination = ArrayList_init_$Create$();
|
|
2038
2038
|
var _iterator__ex2g4s = tmp0.t();
|
|
@@ -2058,50 +2058,50 @@
|
|
|
2058
2058
|
var opponentCards = tmp_0;
|
|
2059
2059
|
var tmp_1;
|
|
2060
2060
|
if (useRandom) {
|
|
2061
|
-
tmp_1 = random(legalCards, $this.
|
|
2061
|
+
tmp_1 = random(legalCards, $this.nbb_1);
|
|
2062
2062
|
} else {
|
|
2063
|
-
tmp_1 = $this.
|
|
2063
|
+
tmp_1 = $this.mbb_1.rbb(hand, legalCards, state.abb_1, state.zba_1, partnerPid, partnerWinning, opponentCards);
|
|
2064
2064
|
}
|
|
2065
2065
|
var card = tmp_1;
|
|
2066
2066
|
hand.y2(card);
|
|
2067
|
-
state.
|
|
2067
|
+
state.abb_1.e1(new SimCard(playerId, card));
|
|
2068
2068
|
}
|
|
2069
2069
|
function isFocalTeam($this, playerId, state) {
|
|
2070
|
-
if (playerId === state.
|
|
2070
|
+
if (playerId === state.fbb_1)
|
|
2071
2071
|
return true;
|
|
2072
|
-
if (!state.
|
|
2072
|
+
if (!state.dbb_1.isTeamGame || !(state.xba_1.g1() === 4))
|
|
2073
2073
|
return false;
|
|
2074
|
-
var focalIndex = state.
|
|
2075
|
-
var partnerIndex = (focalIndex + 2 | 0) % state.
|
|
2076
|
-
return playerId === state.
|
|
2074
|
+
var focalIndex = state.xba_1.o2(state.fbb_1);
|
|
2075
|
+
var partnerIndex = (focalIndex + 2 | 0) % state.xba_1.g1() | 0;
|
|
2076
|
+
return playerId === state.xba_1.h1(partnerIndex);
|
|
2077
2077
|
}
|
|
2078
2078
|
function resolveTrickAndAdvance($this, state) {
|
|
2079
|
-
var result = TrickSimulator_instance.
|
|
2080
|
-
var tmp0 = state.
|
|
2081
|
-
var tmp2 = result.
|
|
2082
|
-
var tmp0_elvis_lhs = state.
|
|
2079
|
+
var result = TrickSimulator_instance.sbb(state.abb_1, state.zba_1);
|
|
2080
|
+
var tmp0 = state.cbb_1;
|
|
2081
|
+
var tmp2 = result.tbb_1;
|
|
2082
|
+
var tmp0_elvis_lhs = state.cbb_1.v2(result.tbb_1);
|
|
2083
2083
|
// Inline function 'kotlin.collections.set' call
|
|
2084
|
-
var value = (tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) + result.
|
|
2084
|
+
var value = (tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) + result.ubb_1 | 0;
|
|
2085
2085
|
tmp0.g3(tmp2, value);
|
|
2086
|
-
state.
|
|
2087
|
-
state.
|
|
2088
|
-
state.
|
|
2086
|
+
state.gbb_1 = result.tbb_1;
|
|
2087
|
+
state.bbb_1 = state.bbb_1 + 1 | 0;
|
|
2088
|
+
state.abb_1.b3();
|
|
2089
2089
|
}
|
|
2090
2090
|
function computeResult($this, state) {
|
|
2091
|
-
var focalIndex = state.
|
|
2092
|
-
var n = state.
|
|
2091
|
+
var focalIndex = state.xba_1.o2(state.fbb_1);
|
|
2092
|
+
var n = state.xba_1.g1();
|
|
2093
2093
|
var tmp;
|
|
2094
|
-
if (state.
|
|
2094
|
+
if (state.dbb_1.isTeamGame && n === 4) {
|
|
2095
2095
|
var partnerIndex = (focalIndex + 2 | 0) % n | 0;
|
|
2096
|
-
tmp = setOf_0([state.
|
|
2096
|
+
tmp = setOf_0([state.xba_1.h1(focalIndex), state.xba_1.h1(partnerIndex)]);
|
|
2097
2097
|
} else {
|
|
2098
|
-
tmp = setOf(state.
|
|
2098
|
+
tmp = setOf(state.fbb_1);
|
|
2099
2099
|
}
|
|
2100
2100
|
var focalTeam = tmp;
|
|
2101
2101
|
var focalPts = 0;
|
|
2102
2102
|
var oppPts = 0;
|
|
2103
2103
|
// Inline function 'kotlin.collections.iterator' call
|
|
2104
|
-
var _iterator__ex2g4s = state.
|
|
2104
|
+
var _iterator__ex2g4s = state.cbb_1.m1().t();
|
|
2105
2105
|
while (_iterator__ex2g4s.u()) {
|
|
2106
2106
|
var _destruct__k2r9zo = _iterator__ex2g4s.v();
|
|
2107
2107
|
// Inline function 'kotlin.collections.component1' call
|
|
@@ -2116,10 +2116,10 @@
|
|
|
2116
2116
|
return new RolloutResult(focalPts, oppPts);
|
|
2117
2117
|
}
|
|
2118
2118
|
function isPartnerWinning($this, state, partnerPid) {
|
|
2119
|
-
if (partnerPid == null || state.
|
|
2119
|
+
if (partnerPid == null || state.abb_1.r())
|
|
2120
2120
|
return false;
|
|
2121
|
-
var firstSuit = first(state.
|
|
2122
|
-
var tmp0 = state.
|
|
2121
|
+
var firstSuit = first(state.abb_1).kbb_1.x6l();
|
|
2122
|
+
var tmp0 = state.abb_1;
|
|
2123
2123
|
var tmp$ret$0;
|
|
2124
2124
|
$l$block_0: {
|
|
2125
2125
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -2134,10 +2134,10 @@
|
|
|
2134
2134
|
break $l$block_0;
|
|
2135
2135
|
}
|
|
2136
2136
|
var it = maxElem;
|
|
2137
|
-
var maxValue = getGrowth(it.
|
|
2137
|
+
var maxValue = getGrowth(it.kbb_1, state.zba_1, firstSuit);
|
|
2138
2138
|
do {
|
|
2139
2139
|
var e = iterator.v();
|
|
2140
|
-
var v = getGrowth(e.
|
|
2140
|
+
var v = getGrowth(e.kbb_1, state.zba_1, firstSuit);
|
|
2141
2141
|
if (compareTo(maxValue, v) < 0) {
|
|
2142
2142
|
maxElem = e;
|
|
2143
2143
|
maxValue = v;
|
|
@@ -2147,12 +2147,12 @@
|
|
|
2147
2147
|
tmp$ret$0 = maxElem;
|
|
2148
2148
|
}
|
|
2149
2149
|
var winner = tmp$ret$0;
|
|
2150
|
-
return (winner == null ? null : winner.
|
|
2150
|
+
return (winner == null ? null : winner.jbb_1) == partnerPid;
|
|
2151
2151
|
}
|
|
2152
2152
|
function Companion_3() {
|
|
2153
|
-
this.
|
|
2153
|
+
this.hbb_1 = 10;
|
|
2154
2154
|
}
|
|
2155
|
-
protoOf(Companion_3).
|
|
2155
|
+
protoOf(Companion_3).ibb = function (playerOrder, leadId) {
|
|
2156
2156
|
var startIdx = coerceAtLeast_0(playerOrder.o2(leadId), 0);
|
|
2157
2157
|
// Inline function 'kotlin.collections.List' call
|
|
2158
2158
|
// Inline function 'kotlin.collections.MutableList' call
|
|
@@ -2170,7 +2170,7 @@
|
|
|
2170
2170
|
while (inductionVariable < size);
|
|
2171
2171
|
return list;
|
|
2172
2172
|
};
|
|
2173
|
-
protoOf(Companion_3).
|
|
2173
|
+
protoOf(Companion_3).lbb = function (playerId, playerOrder, playersMode) {
|
|
2174
2174
|
if (!playersMode.isTeamGame || !(playerOrder.g1() === 4))
|
|
2175
2175
|
return null;
|
|
2176
2176
|
var idx = playerOrder.o2(playerId);
|
|
@@ -2187,15 +2187,15 @@
|
|
|
2187
2187
|
randomOpponentRollout = randomOpponentRollout === VOID ? false : randomOpponentRollout;
|
|
2188
2188
|
endgameSolver = endgameSolver === VOID ? null : endgameSolver;
|
|
2189
2189
|
endgameThreshold = endgameThreshold === VOID ? 5 : endgameThreshold;
|
|
2190
|
-
this.
|
|
2191
|
-
this.
|
|
2192
|
-
this.
|
|
2193
|
-
this.
|
|
2194
|
-
this.
|
|
2190
|
+
this.mbb_1 = rolloutPolicy;
|
|
2191
|
+
this.nbb_1 = random;
|
|
2192
|
+
this.obb_1 = randomOpponentRollout;
|
|
2193
|
+
this.pbb_1 = endgameSolver;
|
|
2194
|
+
this.qbb_1 = endgameThreshold;
|
|
2195
2195
|
}
|
|
2196
|
-
protoOf(DeterministicRollout).
|
|
2196
|
+
protoOf(DeterministicRollout).vbb = function (initialState) {
|
|
2197
2197
|
var state = initialState;
|
|
2198
|
-
var tmp0 = state.
|
|
2198
|
+
var tmp0 = state.yba_1.x2();
|
|
2199
2199
|
var tmp$ret$0;
|
|
2200
2200
|
$l$block: {
|
|
2201
2201
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -2215,21 +2215,21 @@
|
|
|
2215
2215
|
}
|
|
2216
2216
|
var tmp0_elvis_lhs = tmp$ret$0;
|
|
2217
2217
|
var maxTricks = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
|
|
2218
|
-
var tmp = state.
|
|
2218
|
+
var tmp = state.bbb_1 + maxTricks | 0;
|
|
2219
2219
|
var tmp_0;
|
|
2220
2220
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2221
|
-
if (!state.
|
|
2221
|
+
if (!state.abb_1.r()) {
|
|
2222
2222
|
tmp_0 = 1;
|
|
2223
2223
|
} else {
|
|
2224
2224
|
tmp_0 = 0;
|
|
2225
2225
|
}
|
|
2226
2226
|
var totalTricks = tmp + tmp_0 | 0;
|
|
2227
2227
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2228
|
-
if (!state.
|
|
2228
|
+
if (!state.abb_1.r()) {
|
|
2229
2229
|
finishTrick(this, state);
|
|
2230
2230
|
}
|
|
2231
2231
|
$l$loop: while (true) {
|
|
2232
|
-
var tmp0_0 = state.
|
|
2232
|
+
var tmp0_0 = state.yba_1.x2();
|
|
2233
2233
|
var tmp$ret$5;
|
|
2234
2234
|
$l$block_1: {
|
|
2235
2235
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -2257,8 +2257,8 @@
|
|
|
2257
2257
|
if (!tmp$ret$5) {
|
|
2258
2258
|
break $l$loop;
|
|
2259
2259
|
}
|
|
2260
|
-
if (!(this.
|
|
2261
|
-
var tmp1_safe_receiver = this.
|
|
2260
|
+
if (!(this.pbb_1 == null)) {
|
|
2261
|
+
var tmp1_safe_receiver = this.pbb_1.wbb(state, this.qbb_1);
|
|
2262
2262
|
if (tmp1_safe_receiver == null)
|
|
2263
2263
|
null;
|
|
2264
2264
|
else {
|
|
@@ -2268,40 +2268,40 @@
|
|
|
2268
2268
|
}
|
|
2269
2269
|
playFullTrick(this, state);
|
|
2270
2270
|
}
|
|
2271
|
-
var lastTrickWinner = state.
|
|
2272
|
-
var tmp0_1 = state.
|
|
2273
|
-
var tmp2_elvis_lhs = state.
|
|
2271
|
+
var lastTrickWinner = state.gbb_1;
|
|
2272
|
+
var tmp0_1 = state.cbb_1;
|
|
2273
|
+
var tmp2_elvis_lhs = state.cbb_1.v2(lastTrickWinner);
|
|
2274
2274
|
// Inline function 'kotlin.collections.set' call
|
|
2275
2275
|
var value = (tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs) + 10 | 0;
|
|
2276
2276
|
tmp0_1.g3(lastTrickWinner, value);
|
|
2277
2277
|
return computeResult(this, state);
|
|
2278
2278
|
};
|
|
2279
2279
|
function RolloutState(playerOrder, hands, trump, currentTrick, trickNumber, points, playersMode, rules, focalPlayerId, leadPlayerId) {
|
|
2280
|
-
this.
|
|
2281
|
-
this.
|
|
2282
|
-
this.
|
|
2283
|
-
this.
|
|
2284
|
-
this.
|
|
2285
|
-
this.
|
|
2286
|
-
this.
|
|
2287
|
-
this.
|
|
2288
|
-
this.
|
|
2289
|
-
this.
|
|
2280
|
+
this.xba_1 = playerOrder;
|
|
2281
|
+
this.yba_1 = hands;
|
|
2282
|
+
this.zba_1 = trump;
|
|
2283
|
+
this.abb_1 = currentTrick;
|
|
2284
|
+
this.bbb_1 = trickNumber;
|
|
2285
|
+
this.cbb_1 = points;
|
|
2286
|
+
this.dbb_1 = playersMode;
|
|
2287
|
+
this.ebb_1 = rules;
|
|
2288
|
+
this.fbb_1 = focalPlayerId;
|
|
2289
|
+
this.gbb_1 = leadPlayerId;
|
|
2290
2290
|
}
|
|
2291
2291
|
protoOf(RolloutState).toString = function () {
|
|
2292
|
-
return 'RolloutState(playerOrder=' + toString_0(this.
|
|
2292
|
+
return 'RolloutState(playerOrder=' + toString_0(this.xba_1) + ', hands=' + toString_0(this.yba_1) + ', trump=' + this.zba_1.toString() + ', currentTrick=' + toString_0(this.abb_1) + ', trickNumber=' + this.bbb_1 + ', points=' + toString_0(this.cbb_1) + ', playersMode=' + this.dbb_1.toString() + ', rules=' + this.ebb_1.toString() + ', focalPlayerId=' + this.fbb_1 + ', leadPlayerId=' + this.gbb_1 + ')';
|
|
2293
2293
|
};
|
|
2294
2294
|
protoOf(RolloutState).hashCode = function () {
|
|
2295
|
-
var result = hashCode(this.
|
|
2296
|
-
result = imul(result, 31) + hashCode(this.
|
|
2297
|
-
result = imul(result, 31) + this.
|
|
2298
|
-
result = imul(result, 31) + hashCode(this.
|
|
2299
|
-
result = imul(result, 31) + this.
|
|
2300
|
-
result = imul(result, 31) + hashCode(this.
|
|
2301
|
-
result = imul(result, 31) + this.
|
|
2302
|
-
result = imul(result, 31) + this.
|
|
2303
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
2304
|
-
result = imul(result, 31) + getStringHashCode(this.
|
|
2295
|
+
var result = hashCode(this.xba_1);
|
|
2296
|
+
result = imul(result, 31) + hashCode(this.yba_1) | 0;
|
|
2297
|
+
result = imul(result, 31) + this.zba_1.hashCode() | 0;
|
|
2298
|
+
result = imul(result, 31) + hashCode(this.abb_1) | 0;
|
|
2299
|
+
result = imul(result, 31) + this.bbb_1 | 0;
|
|
2300
|
+
result = imul(result, 31) + hashCode(this.cbb_1) | 0;
|
|
2301
|
+
result = imul(result, 31) + this.dbb_1.hashCode() | 0;
|
|
2302
|
+
result = imul(result, 31) + this.ebb_1.hashCode() | 0;
|
|
2303
|
+
result = imul(result, 31) + getStringHashCode(this.fbb_1) | 0;
|
|
2304
|
+
result = imul(result, 31) + getStringHashCode(this.gbb_1) | 0;
|
|
2305
2305
|
return result;
|
|
2306
2306
|
};
|
|
2307
2307
|
protoOf(RolloutState).equals = function (other) {
|
|
@@ -2309,38 +2309,38 @@
|
|
|
2309
2309
|
return true;
|
|
2310
2310
|
if (!(other instanceof RolloutState))
|
|
2311
2311
|
return false;
|
|
2312
|
-
if (!equals(this.
|
|
2312
|
+
if (!equals(this.xba_1, other.xba_1))
|
|
2313
2313
|
return false;
|
|
2314
|
-
if (!equals(this.
|
|
2314
|
+
if (!equals(this.yba_1, other.yba_1))
|
|
2315
2315
|
return false;
|
|
2316
|
-
if (!this.
|
|
2316
|
+
if (!this.zba_1.equals(other.zba_1))
|
|
2317
2317
|
return false;
|
|
2318
|
-
if (!equals(this.
|
|
2318
|
+
if (!equals(this.abb_1, other.abb_1))
|
|
2319
2319
|
return false;
|
|
2320
|
-
if (!(this.
|
|
2320
|
+
if (!(this.bbb_1 === other.bbb_1))
|
|
2321
2321
|
return false;
|
|
2322
|
-
if (!equals(this.
|
|
2322
|
+
if (!equals(this.cbb_1, other.cbb_1))
|
|
2323
2323
|
return false;
|
|
2324
|
-
if (!this.
|
|
2324
|
+
if (!this.dbb_1.equals(other.dbb_1))
|
|
2325
2325
|
return false;
|
|
2326
|
-
if (!this.
|
|
2326
|
+
if (!this.ebb_1.equals(other.ebb_1))
|
|
2327
2327
|
return false;
|
|
2328
|
-
if (!(this.
|
|
2328
|
+
if (!(this.fbb_1 === other.fbb_1))
|
|
2329
2329
|
return false;
|
|
2330
|
-
if (!(this.
|
|
2330
|
+
if (!(this.gbb_1 === other.gbb_1))
|
|
2331
2331
|
return false;
|
|
2332
2332
|
return true;
|
|
2333
2333
|
};
|
|
2334
2334
|
function RolloutResult(focalTeamPoints, opponentTeamPoints) {
|
|
2335
|
-
this.
|
|
2336
|
-
this.
|
|
2335
|
+
this.xbb_1 = focalTeamPoints;
|
|
2336
|
+
this.ybb_1 = opponentTeamPoints;
|
|
2337
2337
|
}
|
|
2338
2338
|
protoOf(RolloutResult).toString = function () {
|
|
2339
|
-
return 'RolloutResult(focalTeamPoints=' + this.
|
|
2339
|
+
return 'RolloutResult(focalTeamPoints=' + this.xbb_1 + ', opponentTeamPoints=' + this.ybb_1 + ')';
|
|
2340
2340
|
};
|
|
2341
2341
|
protoOf(RolloutResult).hashCode = function () {
|
|
2342
|
-
var result = this.
|
|
2343
|
-
result = imul(result, 31) + this.
|
|
2342
|
+
var result = this.xbb_1;
|
|
2343
|
+
result = imul(result, 31) + this.ybb_1 | 0;
|
|
2344
2344
|
return result;
|
|
2345
2345
|
};
|
|
2346
2346
|
protoOf(RolloutResult).equals = function (other) {
|
|
@@ -2348,22 +2348,22 @@
|
|
|
2348
2348
|
return true;
|
|
2349
2349
|
if (!(other instanceof RolloutResult))
|
|
2350
2350
|
return false;
|
|
2351
|
-
if (!(this.
|
|
2351
|
+
if (!(this.xbb_1 === other.xbb_1))
|
|
2352
2352
|
return false;
|
|
2353
|
-
if (!(this.
|
|
2353
|
+
if (!(this.ybb_1 === other.ybb_1))
|
|
2354
2354
|
return false;
|
|
2355
2355
|
return true;
|
|
2356
2356
|
};
|
|
2357
2357
|
function WorldMoveScore(action, normalizedScore) {
|
|
2358
|
-
this.
|
|
2359
|
-
this.
|
|
2358
|
+
this.zbb_1 = action;
|
|
2359
|
+
this.abc_1 = normalizedScore;
|
|
2360
2360
|
}
|
|
2361
2361
|
protoOf(WorldMoveScore).toString = function () {
|
|
2362
|
-
return 'WorldMoveScore(action=' + toString_0(this.
|
|
2362
|
+
return 'WorldMoveScore(action=' + toString_0(this.zbb_1) + ', normalizedScore=' + this.abc_1 + ')';
|
|
2363
2363
|
};
|
|
2364
2364
|
protoOf(WorldMoveScore).hashCode = function () {
|
|
2365
|
-
var result = hashCode(this.
|
|
2366
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2365
|
+
var result = hashCode(this.zbb_1);
|
|
2366
|
+
result = imul(result, 31) + getNumberHashCode(this.abc_1) | 0;
|
|
2367
2367
|
return result;
|
|
2368
2368
|
};
|
|
2369
2369
|
protoOf(WorldMoveScore).equals = function (other) {
|
|
@@ -2371,15 +2371,15 @@
|
|
|
2371
2371
|
return true;
|
|
2372
2372
|
if (!(other instanceof WorldMoveScore))
|
|
2373
2373
|
return false;
|
|
2374
|
-
if (!equals(this.
|
|
2374
|
+
if (!equals(this.zbb_1, other.zbb_1))
|
|
2375
2375
|
return false;
|
|
2376
|
-
if (!equals(this.
|
|
2376
|
+
if (!equals(this.abc_1, other.abc_1))
|
|
2377
2377
|
return false;
|
|
2378
2378
|
return true;
|
|
2379
2379
|
};
|
|
2380
2380
|
function MoveScoreAggregator() {
|
|
2381
2381
|
}
|
|
2382
|
-
protoOf(MoveScoreAggregator).
|
|
2382
|
+
protoOf(MoveScoreAggregator).bbc = function (worldScores, config) {
|
|
2383
2383
|
if (worldScores.r())
|
|
2384
2384
|
return emptyMap();
|
|
2385
2385
|
// Inline function 'kotlin.collections.flatMap' call
|
|
@@ -2394,7 +2394,7 @@
|
|
|
2394
2394
|
var _iterator__ex2g4s_0 = element.t();
|
|
2395
2395
|
while (_iterator__ex2g4s_0.u()) {
|
|
2396
2396
|
var item = _iterator__ex2g4s_0.v();
|
|
2397
|
-
var tmp$ret$0 = item.
|
|
2397
|
+
var tmp$ret$0 = item.zbb_1;
|
|
2398
2398
|
destination_0.e1(tmp$ret$0);
|
|
2399
2399
|
}
|
|
2400
2400
|
var list = destination_0;
|
|
@@ -2421,7 +2421,7 @@
|
|
|
2421
2421
|
var _iterator__ex2g4s_3 = item_0.t();
|
|
2422
2422
|
while (_iterator__ex2g4s_3.u()) {
|
|
2423
2423
|
var element_1 = _iterator__ex2g4s_3.v();
|
|
2424
|
-
if (equals(element_1.
|
|
2424
|
+
if (equals(element_1.zbb_1, element_0)) {
|
|
2425
2425
|
tmp$ret$7 = element_1;
|
|
2426
2426
|
break $l$block;
|
|
2427
2427
|
}
|
|
@@ -2429,7 +2429,7 @@
|
|
|
2429
2429
|
tmp$ret$7 = null;
|
|
2430
2430
|
}
|
|
2431
2431
|
var tmp0_safe_receiver = tmp$ret$7;
|
|
2432
|
-
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.abc_1;
|
|
2433
2433
|
var tmp$ret$8 = tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs;
|
|
2434
2434
|
destination_1.e1(tmp$ret$8);
|
|
2435
2435
|
}
|
|
@@ -2450,7 +2450,7 @@
|
|
|
2450
2450
|
destination_2.g3(tmp, tmp$ret$16);
|
|
2451
2451
|
}
|
|
2452
2452
|
var avgScores = destination_2;
|
|
2453
|
-
if (!config.
|
|
2453
|
+
if (!config.ebc_1) {
|
|
2454
2454
|
return avgScores;
|
|
2455
2455
|
}
|
|
2456
2456
|
// Inline function 'kotlin.collections.associateWith' call
|
|
@@ -2505,7 +2505,7 @@
|
|
|
2505
2505
|
var tmp0_elvis_lhs = avgScores.v2(element_4);
|
|
2506
2506
|
var tmp_0 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
|
|
2507
2507
|
var tmp1_elvis_lhs_3 = maxRegrets.v2(element_4);
|
|
2508
|
-
var tmp$ret$27 = tmp_0 - config.
|
|
2508
|
+
var tmp$ret$27 = tmp_0 - config.fbc_1 * (tmp1_elvis_lhs_3 == null ? 0.0 : tmp1_elvis_lhs_3);
|
|
2509
2509
|
result_1.g3(element_4, tmp$ret$27);
|
|
2510
2510
|
}
|
|
2511
2511
|
return result_1;
|
|
@@ -2521,23 +2521,23 @@
|
|
|
2521
2521
|
variancePenalty = variancePenalty === VOID ? 0.3 : variancePenalty;
|
|
2522
2522
|
randomOpponentRollout = randomOpponentRollout === VOID ? false : randomOpponentRollout;
|
|
2523
2523
|
endgameSolveThreshold = endgameSolveThreshold === VOID ? 0 : endgameSolveThreshold;
|
|
2524
|
-
this.
|
|
2525
|
-
this.
|
|
2526
|
-
this.
|
|
2527
|
-
this.
|
|
2528
|
-
this.
|
|
2529
|
-
this.
|
|
2524
|
+
this.cbc_1 = worldCount;
|
|
2525
|
+
this.dbc_1 = exactSolveThreshold;
|
|
2526
|
+
this.ebc_1 = enableStrategyFusionMitigation;
|
|
2527
|
+
this.fbc_1 = variancePenalty;
|
|
2528
|
+
this.gbc_1 = randomOpponentRollout;
|
|
2529
|
+
this.hbc_1 = endgameSolveThreshold;
|
|
2530
2530
|
}
|
|
2531
2531
|
protoOf(PimcConfig).toString = function () {
|
|
2532
|
-
return 'PimcConfig(worldCount=' + this.
|
|
2532
|
+
return 'PimcConfig(worldCount=' + this.cbc_1 + ', exactSolveThreshold=' + this.dbc_1 + ', enableStrategyFusionMitigation=' + this.ebc_1 + ', variancePenalty=' + this.fbc_1 + ', randomOpponentRollout=' + this.gbc_1 + ', endgameSolveThreshold=' + this.hbc_1 + ')';
|
|
2533
2533
|
};
|
|
2534
2534
|
protoOf(PimcConfig).hashCode = function () {
|
|
2535
|
-
var result = this.
|
|
2536
|
-
result = imul(result, 31) + this.
|
|
2537
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
2538
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2539
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
2540
|
-
result = imul(result, 31) + this.
|
|
2535
|
+
var result = this.cbc_1;
|
|
2536
|
+
result = imul(result, 31) + this.dbc_1 | 0;
|
|
2537
|
+
result = imul(result, 31) + getBooleanHashCode(this.ebc_1) | 0;
|
|
2538
|
+
result = imul(result, 31) + getNumberHashCode(this.fbc_1) | 0;
|
|
2539
|
+
result = imul(result, 31) + getBooleanHashCode(this.gbc_1) | 0;
|
|
2540
|
+
result = imul(result, 31) + this.hbc_1 | 0;
|
|
2541
2541
|
return result;
|
|
2542
2542
|
};
|
|
2543
2543
|
protoOf(PimcConfig).equals = function (other) {
|
|
@@ -2545,17 +2545,17 @@
|
|
|
2545
2545
|
return true;
|
|
2546
2546
|
if (!(other instanceof PimcConfig))
|
|
2547
2547
|
return false;
|
|
2548
|
-
if (!(this.
|
|
2548
|
+
if (!(this.cbc_1 === other.cbc_1))
|
|
2549
2549
|
return false;
|
|
2550
|
-
if (!(this.
|
|
2550
|
+
if (!(this.dbc_1 === other.dbc_1))
|
|
2551
2551
|
return false;
|
|
2552
|
-
if (!(this.
|
|
2552
|
+
if (!(this.ebc_1 === other.ebc_1))
|
|
2553
2553
|
return false;
|
|
2554
|
-
if (!equals(this.
|
|
2554
|
+
if (!equals(this.fbc_1, other.fbc_1))
|
|
2555
2555
|
return false;
|
|
2556
|
-
if (!(this.
|
|
2556
|
+
if (!(this.gbc_1 === other.gbc_1))
|
|
2557
2557
|
return false;
|
|
2558
|
-
if (!(this.
|
|
2558
|
+
if (!(this.hbc_1 === other.hbc_1))
|
|
2559
2559
|
return false;
|
|
2560
2560
|
return true;
|
|
2561
2561
|
};
|
|
@@ -2563,7 +2563,7 @@
|
|
|
2563
2563
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
2564
2564
|
var hands = LinkedHashMap_init_$Create$();
|
|
2565
2565
|
// Inline function 'kotlin.collections.iterator' call
|
|
2566
|
-
var _iterator__ex2g4s = world.
|
|
2566
|
+
var _iterator__ex2g4s = world.ibc_1.m1().t();
|
|
2567
2567
|
while (_iterator__ex2g4s.u()) {
|
|
2568
2568
|
var _destruct__k2r9zo = _iterator__ex2g4s.v();
|
|
2569
2569
|
// Inline function 'kotlin.collections.component1' call
|
|
@@ -2574,61 +2574,61 @@
|
|
|
2574
2574
|
var value = toMutableList(cards);
|
|
2575
2575
|
hands.g3(pid, value);
|
|
2576
2576
|
}
|
|
2577
|
-
var focalHand = toMutableList(state.
|
|
2578
|
-
focalHand.y2(action.
|
|
2577
|
+
var focalHand = toMutableList(state.cb7_1);
|
|
2578
|
+
focalHand.y2(action.wb6_1);
|
|
2579
2579
|
// Inline function 'kotlin.collections.set' call
|
|
2580
|
-
var key = state.
|
|
2580
|
+
var key = state.ab7_1;
|
|
2581
2581
|
hands.g3(key, focalHand);
|
|
2582
2582
|
// Inline function 'kotlin.collections.map' call
|
|
2583
|
-
var this_0 = state.
|
|
2583
|
+
var this_0 = state.eb7_1;
|
|
2584
2584
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2585
2585
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
2586
2586
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
2587
2587
|
while (_iterator__ex2g4s_0.u()) {
|
|
2588
2588
|
var item = _iterator__ex2g4s_0.v();
|
|
2589
|
-
var tmp$ret$6 = new SimCard(item.
|
|
2589
|
+
var tmp$ret$6 = new SimCard(item.x8k_1, item.z8k_1);
|
|
2590
2590
|
destination.e1(tmp$ret$6);
|
|
2591
2591
|
}
|
|
2592
2592
|
var currentTrick = toMutableList(destination);
|
|
2593
|
-
currentTrick.e1(new SimCard(state.
|
|
2593
|
+
currentTrick.e1(new SimCard(state.ab7_1, action.wb6_1));
|
|
2594
2594
|
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
2595
2595
|
var points = LinkedHashMap_init_$Create$();
|
|
2596
|
-
var tmp2 = state.
|
|
2596
|
+
var tmp2 = state.ab7_1;
|
|
2597
2597
|
// Inline function 'kotlin.collections.set' call
|
|
2598
|
-
var value_0 = state.
|
|
2598
|
+
var value_0 = state.lb7_1;
|
|
2599
2599
|
points.g3(tmp2, value_0);
|
|
2600
|
-
var focalIndex = state.
|
|
2601
|
-
if (state.
|
|
2602
|
-
var oppId = state.
|
|
2600
|
+
var focalIndex = state.bb7_1.o2(state.ab7_1);
|
|
2601
|
+
if (state.bb7_1.g1() > 1) {
|
|
2602
|
+
var oppId = state.bb7_1.h1((focalIndex + 1 | 0) % state.bb7_1.g1() | 0);
|
|
2603
2603
|
// Inline function 'kotlin.collections.set' call
|
|
2604
|
-
var value_1 = state.
|
|
2604
|
+
var value_1 = state.mb7_1;
|
|
2605
2605
|
points.g3(oppId, value_1);
|
|
2606
2606
|
}
|
|
2607
2607
|
var tmp;
|
|
2608
2608
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2609
|
-
if (!state.
|
|
2610
|
-
tmp = first(state.
|
|
2609
|
+
if (!state.eb7_1.r()) {
|
|
2610
|
+
tmp = first(state.eb7_1).x8k_1;
|
|
2611
2611
|
} else {
|
|
2612
|
-
tmp = state.
|
|
2612
|
+
tmp = state.ab7_1;
|
|
2613
2613
|
}
|
|
2614
2614
|
var leadPid = tmp;
|
|
2615
|
-
var rolloutState = new RolloutState(state.
|
|
2616
|
-
var result = $this.
|
|
2617
|
-
var total = coerceAtLeast(result.
|
|
2618
|
-
return result.
|
|
2615
|
+
var rolloutState = new RolloutState(state.bb7_1, hands, trump, currentTrick, state.nb7_1, points, state.vb7_1, state.ub7_1, state.ab7_1, leadPid);
|
|
2616
|
+
var result = $this.pbc_1.vbb(rolloutState);
|
|
2617
|
+
var total = coerceAtLeast(result.xbb_1 + result.ybb_1 | 0, 1.0);
|
|
2618
|
+
return result.xbb_1 / total;
|
|
2619
2619
|
}
|
|
2620
2620
|
function PimcEngine(beliefNetwork, rolloutPolicy, config, random) {
|
|
2621
2621
|
config = config === VOID ? new PimcConfig() : config;
|
|
2622
2622
|
random = random === VOID ? Default_getInstance() : random;
|
|
2623
|
-
this.
|
|
2624
|
-
this.
|
|
2625
|
-
this.
|
|
2626
|
-
this.
|
|
2627
|
-
this.
|
|
2628
|
-
this.
|
|
2629
|
-
this.
|
|
2630
|
-
}
|
|
2631
|
-
protoOf(PimcEngine).
|
|
2623
|
+
this.jbc_1 = beliefNetwork;
|
|
2624
|
+
this.kbc_1 = rolloutPolicy;
|
|
2625
|
+
this.lbc_1 = config;
|
|
2626
|
+
this.mbc_1 = random;
|
|
2627
|
+
this.nbc_1 = new WorldSampler(this.mbc_1);
|
|
2628
|
+
this.obc_1 = this.lbc_1.hbc_1 > 0 ? new EndgameSolver() : null;
|
|
2629
|
+
this.pbc_1 = new DeterministicRollout(this.kbc_1, this.mbc_1, this.lbc_1.gbc_1, this.obc_1, this.lbc_1.hbc_1);
|
|
2630
|
+
}
|
|
2631
|
+
protoOf(PimcEngine).qbc = function (state, legalActions) {
|
|
2632
2632
|
if (legalActions.g1() <= 1) {
|
|
2633
2633
|
// Inline function 'kotlin.collections.associateWith' call
|
|
2634
2634
|
var result = LinkedHashMap_init_$Create$_0(coerceAtLeast_0(mapCapacity(collectionSizeOrDefault(legalActions, 10)), 16));
|
|
@@ -2662,7 +2662,7 @@
|
|
|
2662
2662
|
}
|
|
2663
2663
|
return result_0;
|
|
2664
2664
|
}
|
|
2665
|
-
var tmp0_elvis_lhs = state.
|
|
2665
|
+
var tmp0_elvis_lhs = state.fb7_1;
|
|
2666
2666
|
var tmp;
|
|
2667
2667
|
if (tmp0_elvis_lhs == null) {
|
|
2668
2668
|
// Inline function 'kotlin.collections.associateWith' call
|
|
@@ -2678,8 +2678,8 @@
|
|
|
2678
2678
|
tmp = tmp0_elvis_lhs;
|
|
2679
2679
|
}
|
|
2680
2680
|
var trump = tmp;
|
|
2681
|
-
var belief = this.
|
|
2682
|
-
var worlds = this.
|
|
2681
|
+
var belief = this.jbc_1.vb8(state);
|
|
2682
|
+
var worlds = this.nbc_1.sbc(state, belief, this.lbc_1.cbc_1);
|
|
2683
2683
|
// Inline function 'kotlin.collections.map' call
|
|
2684
2684
|
// Inline function 'kotlin.collections.mapTo' call
|
|
2685
2685
|
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(worlds, 10));
|
|
@@ -2699,18 +2699,18 @@
|
|
|
2699
2699
|
destination_0.e1(destination_1);
|
|
2700
2700
|
}
|
|
2701
2701
|
var worldScores = destination_0;
|
|
2702
|
-
return MoveScoreAggregator_instance.
|
|
2702
|
+
return MoveScoreAggregator_instance.bbc(worldScores, this.lbc_1);
|
|
2703
2703
|
};
|
|
2704
2704
|
function SimCard(playerId, card) {
|
|
2705
|
-
this.
|
|
2706
|
-
this.
|
|
2705
|
+
this.jbb_1 = playerId;
|
|
2706
|
+
this.kbb_1 = card;
|
|
2707
2707
|
}
|
|
2708
2708
|
protoOf(SimCard).toString = function () {
|
|
2709
|
-
return 'SimCard(playerId=' + this.
|
|
2709
|
+
return 'SimCard(playerId=' + this.jbb_1 + ', card=' + this.kbb_1.toString() + ')';
|
|
2710
2710
|
};
|
|
2711
2711
|
protoOf(SimCard).hashCode = function () {
|
|
2712
|
-
var result = getStringHashCode(this.
|
|
2713
|
-
result = imul(result, 31) + this.
|
|
2712
|
+
var result = getStringHashCode(this.jbb_1);
|
|
2713
|
+
result = imul(result, 31) + this.kbb_1.hashCode() | 0;
|
|
2714
2714
|
return result;
|
|
2715
2715
|
};
|
|
2716
2716
|
protoOf(SimCard).equals = function (other) {
|
|
@@ -2718,22 +2718,22 @@
|
|
|
2718
2718
|
return true;
|
|
2719
2719
|
if (!(other instanceof SimCard))
|
|
2720
2720
|
return false;
|
|
2721
|
-
if (!(this.
|
|
2721
|
+
if (!(this.jbb_1 === other.jbb_1))
|
|
2722
2722
|
return false;
|
|
2723
|
-
if (!this.
|
|
2723
|
+
if (!this.kbb_1.equals(other.kbb_1))
|
|
2724
2724
|
return false;
|
|
2725
2725
|
return true;
|
|
2726
2726
|
};
|
|
2727
2727
|
function TrickResult(winnerId, points) {
|
|
2728
|
-
this.
|
|
2729
|
-
this.
|
|
2728
|
+
this.tbb_1 = winnerId;
|
|
2729
|
+
this.ubb_1 = points;
|
|
2730
2730
|
}
|
|
2731
2731
|
protoOf(TrickResult).toString = function () {
|
|
2732
|
-
return 'TrickResult(winnerId=' + this.
|
|
2732
|
+
return 'TrickResult(winnerId=' + this.tbb_1 + ', points=' + this.ubb_1 + ')';
|
|
2733
2733
|
};
|
|
2734
2734
|
protoOf(TrickResult).hashCode = function () {
|
|
2735
|
-
var result = getStringHashCode(this.
|
|
2736
|
-
result = imul(result, 31) + this.
|
|
2735
|
+
var result = getStringHashCode(this.tbb_1);
|
|
2736
|
+
result = imul(result, 31) + this.ubb_1 | 0;
|
|
2737
2737
|
return result;
|
|
2738
2738
|
};
|
|
2739
2739
|
protoOf(TrickResult).equals = function (other) {
|
|
@@ -2741,9 +2741,9 @@
|
|
|
2741
2741
|
return true;
|
|
2742
2742
|
if (!(other instanceof TrickResult))
|
|
2743
2743
|
return false;
|
|
2744
|
-
if (!(this.
|
|
2744
|
+
if (!(this.tbb_1 === other.tbb_1))
|
|
2745
2745
|
return false;
|
|
2746
|
-
if (!(this.
|
|
2746
|
+
if (!(this.ubb_1 === other.ubb_1))
|
|
2747
2747
|
return false;
|
|
2748
2748
|
return true;
|
|
2749
2749
|
};
|
|
@@ -2771,14 +2771,14 @@
|
|
|
2771
2771
|
}
|
|
2772
2772
|
function TrickSimulator() {
|
|
2773
2773
|
}
|
|
2774
|
-
protoOf(TrickSimulator).
|
|
2774
|
+
protoOf(TrickSimulator).sbb = function (cards, trump) {
|
|
2775
2775
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2776
2776
|
// Inline function 'kotlin.require' call
|
|
2777
2777
|
if (!!cards.r()) {
|
|
2778
2778
|
var message = 'Cannot resolve an empty trick';
|
|
2779
2779
|
throw IllegalArgumentException_init_$Create$(toString_0(message));
|
|
2780
2780
|
}
|
|
2781
|
-
var firstSuit = first(cards).
|
|
2781
|
+
var firstSuit = first(cards).kbb_1.x6l();
|
|
2782
2782
|
var tmp$ret$3;
|
|
2783
2783
|
$l$block_0: {
|
|
2784
2784
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -2793,10 +2793,10 @@
|
|
|
2793
2793
|
break $l$block_0;
|
|
2794
2794
|
}
|
|
2795
2795
|
var it = maxElem;
|
|
2796
|
-
var maxValue = getGrowth(it.
|
|
2796
|
+
var maxValue = getGrowth(it.kbb_1, trump, firstSuit);
|
|
2797
2797
|
do {
|
|
2798
2798
|
var e = iterator.v();
|
|
2799
|
-
var v = getGrowth(e.
|
|
2799
|
+
var v = getGrowth(e.kbb_1, trump, firstSuit);
|
|
2800
2800
|
if (compareTo(maxValue, v) < 0) {
|
|
2801
2801
|
maxElem = e;
|
|
2802
2802
|
maxValue = v;
|
|
@@ -2812,17 +2812,17 @@
|
|
|
2812
2812
|
while (_iterator__ex2g4s.u()) {
|
|
2813
2813
|
var element = _iterator__ex2g4s.v();
|
|
2814
2814
|
var tmp = sum;
|
|
2815
|
-
sum = tmp + getPoint(element.
|
|
2815
|
+
sum = tmp + getPoint(element.kbb_1, trump) | 0;
|
|
2816
2816
|
}
|
|
2817
2817
|
var points = sum;
|
|
2818
|
-
return new TrickResult(winner.
|
|
2818
|
+
return new TrickResult(winner.jbb_1, points);
|
|
2819
2819
|
};
|
|
2820
|
-
protoOf(TrickSimulator).
|
|
2820
|
+
protoOf(TrickSimulator).mb9 = function (hand, trickCards, trump, rules, playersMode, playerId, partnerPlayerId) {
|
|
2821
2821
|
if (hand.r())
|
|
2822
2822
|
return emptyList();
|
|
2823
2823
|
if (trickCards.r())
|
|
2824
2824
|
return hand;
|
|
2825
|
-
var firstSuit = first(trickCards).
|
|
2825
|
+
var firstSuit = first(trickCards).kbb_1.x6l();
|
|
2826
2826
|
var tmp$ret$0;
|
|
2827
2827
|
$l$block_0: {
|
|
2828
2828
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -2917,7 +2917,7 @@
|
|
|
2917
2917
|
var _iterator__ex2g4s_3 = trickCards.t();
|
|
2918
2918
|
while (_iterator__ex2g4s_3.u()) {
|
|
2919
2919
|
var element_3 = _iterator__ex2g4s_3.v();
|
|
2920
|
-
if (element_3.
|
|
2920
|
+
if (element_3.kbb_1.x6l().equals(trump)) {
|
|
2921
2921
|
tmp$ret$10 = true;
|
|
2922
2922
|
break $l$block_4;
|
|
2923
2923
|
}
|
|
@@ -2957,10 +2957,10 @@
|
|
|
2957
2957
|
break $l$block_6;
|
|
2958
2958
|
}
|
|
2959
2959
|
var it = maxElem;
|
|
2960
|
-
var maxValue = getGrowth(it.
|
|
2960
|
+
var maxValue = getGrowth(it.kbb_1, trump, firstSuit);
|
|
2961
2961
|
do {
|
|
2962
2962
|
var e = iterator.v();
|
|
2963
|
-
var v = getGrowth(e.
|
|
2963
|
+
var v = getGrowth(e.kbb_1, trump, firstSuit);
|
|
2964
2964
|
if (compareTo(maxValue, v) < 0) {
|
|
2965
2965
|
maxElem = e;
|
|
2966
2966
|
maxValue = v;
|
|
@@ -2977,7 +2977,7 @@
|
|
|
2977
2977
|
tmp_4 = tmp1_elvis_lhs;
|
|
2978
2978
|
}
|
|
2979
2979
|
var winningCard = tmp_4;
|
|
2980
|
-
var isPartnerWinning = playersMode.isTeamGame && winningCard.
|
|
2980
|
+
var isPartnerWinning = playersMode.isTeamGame && winningCard.jbb_1 === partnerPlayerId;
|
|
2981
2981
|
if (isPartnerWinning) {
|
|
2982
2982
|
var tmp_5;
|
|
2983
2983
|
switch (rules.trumpCardStepPartnerMode.a1_1) {
|
|
@@ -2988,7 +2988,7 @@
|
|
|
2988
2988
|
tmp_5 = candidates;
|
|
2989
2989
|
break;
|
|
2990
2990
|
case 1:
|
|
2991
|
-
tmp_5 = filterHigherTrumpOrAll(this, candidates, winningCard.
|
|
2991
|
+
tmp_5 = filterHigherTrumpOrAll(this, candidates, winningCard.kbb_1, trump, firstSuit);
|
|
2992
2992
|
break;
|
|
2993
2993
|
default:
|
|
2994
2994
|
noWhenBranchMatchedException();
|
|
@@ -2996,7 +2996,7 @@
|
|
|
2996
2996
|
}
|
|
2997
2997
|
return tmp_5;
|
|
2998
2998
|
}
|
|
2999
|
-
return filterHigherTrumpOrAll(this, candidates, winningCard.
|
|
2999
|
+
return filterHigherTrumpOrAll(this, candidates, winningCard.kbb_1, trump, firstSuit);
|
|
3000
3000
|
};
|
|
3001
3001
|
var TrickSimulator_instance;
|
|
3002
3002
|
function TrickSimulator_getInstance() {
|
|
@@ -3008,7 +3008,7 @@
|
|
|
3008
3008
|
var _iterator__ex2g4s = get_entries().t();
|
|
3009
3009
|
while (_iterator__ex2g4s.u()) {
|
|
3010
3010
|
var suit = _iterator__ex2g4s.v();
|
|
3011
|
-
var _iterator__ex2g4s_0 = $this.
|
|
3011
|
+
var _iterator__ex2g4s_0 = $this.vbc_1.t();
|
|
3012
3012
|
while (_iterator__ex2g4s_0.u()) {
|
|
3013
3013
|
var name = _iterator__ex2g4s_0.v();
|
|
3014
3014
|
var idx = imul(suit.a1_1, 8) + name.a1_1 | 0;
|
|
@@ -3037,7 +3037,7 @@
|
|
|
3037
3037
|
var currentSizes = new Int32Array(opponents.g1());
|
|
3038
3038
|
var assigned = booleanArray(32);
|
|
3039
3039
|
// Inline function 'kotlin.collections.sortedBy' call
|
|
3040
|
-
var this_0 = get_indices_0(belief.
|
|
3040
|
+
var this_0 = get_indices_0(belief.ab9_1);
|
|
3041
3041
|
// Inline function 'kotlin.comparisons.compareBy' call
|
|
3042
3042
|
var tmp = WorldSampler$sampleOneWorld$lambda($this, belief);
|
|
3043
3043
|
var tmp$ret$4 = new sam$kotlin_Comparator$0_1(tmp);
|
|
@@ -3045,8 +3045,8 @@
|
|
|
3045
3045
|
var _iterator__ex2g4s_0 = sortedHiddenIndices.t();
|
|
3046
3046
|
$l$loop: while (_iterator__ex2g4s_0.u()) {
|
|
3047
3047
|
var rowIdx = _iterator__ex2g4s_0.v();
|
|
3048
|
-
var cardIdx = belief.
|
|
3049
|
-
var probs = belief.
|
|
3048
|
+
var cardIdx = belief.ab9_1[rowIdx];
|
|
3049
|
+
var probs = belief.zb8_1[rowIdx];
|
|
3050
3050
|
var tmp0_elvis_lhs = allCards[cardIdx];
|
|
3051
3051
|
var tmp_0;
|
|
3052
3052
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -3105,12 +3105,12 @@
|
|
|
3105
3105
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3106
3106
|
var candidates = ArrayList_init_$Create$();
|
|
3107
3107
|
var inductionVariable = 0;
|
|
3108
|
-
var last = belief.
|
|
3108
|
+
var last = belief.ab9_1.length - 1 | 0;
|
|
3109
3109
|
if (inductionVariable <= last)
|
|
3110
3110
|
$l$loop: do {
|
|
3111
3111
|
var rowIdx = inductionVariable;
|
|
3112
3112
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3113
|
-
var cardIdx = belief.
|
|
3113
|
+
var cardIdx = belief.ab9_1[rowIdx];
|
|
3114
3114
|
var tmp0_elvis_lhs = allCards[cardIdx];
|
|
3115
3115
|
var tmp;
|
|
3116
3116
|
if (tmp0_elvis_lhs == null) {
|
|
@@ -3123,7 +3123,7 @@
|
|
|
3123
3123
|
if (voids.m2(card.x6l())) {
|
|
3124
3124
|
tmp_0 = 0.0;
|
|
3125
3125
|
} else {
|
|
3126
|
-
tmp_0 = coerceAtLeast(belief.
|
|
3126
|
+
tmp_0 = coerceAtLeast(belief.zb8_1[rowIdx][0], 1.0E-6);
|
|
3127
3127
|
}
|
|
3128
3128
|
var weight = tmp_0;
|
|
3129
3129
|
candidates.e1(new Triple(rowIdx, card, weight));
|
|
@@ -3152,7 +3152,7 @@
|
|
|
3152
3152
|
hand.e1(candidates.e3(0).un_1);
|
|
3153
3153
|
continue $l$loop_1;
|
|
3154
3154
|
}
|
|
3155
|
-
var r = $this.
|
|
3155
|
+
var r = $this.rbc_1.bj() * totalWeight;
|
|
3156
3156
|
var selectedIdx = get_lastIndex(candidates);
|
|
3157
3157
|
var inductionVariable_0 = 0;
|
|
3158
3158
|
var last_0 = candidates.g1() - 1 | 0;
|
|
@@ -3172,7 +3172,7 @@
|
|
|
3172
3172
|
return new SampledWorld(mapOf(to(opponent, hand)));
|
|
3173
3173
|
}
|
|
3174
3174
|
function sampleFromDistribution($this, probs) {
|
|
3175
|
-
var r = $this.
|
|
3175
|
+
var r = $this.rbc_1.cj();
|
|
3176
3176
|
var cumulative = 0.0;
|
|
3177
3177
|
var inductionVariable = 0;
|
|
3178
3178
|
var last = probs.length - 1 | 0;
|
|
@@ -3202,9 +3202,9 @@
|
|
|
3202
3202
|
}
|
|
3203
3203
|
function Companion_4() {
|
|
3204
3204
|
Companion_instance_6 = this;
|
|
3205
|
-
this.
|
|
3206
|
-
this.
|
|
3207
|
-
this.
|
|
3205
|
+
this.tbc_1 = 100;
|
|
3206
|
+
this.ubc_1 = 1.0E-6;
|
|
3207
|
+
this.vbc_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()]);
|
|
3208
3208
|
}
|
|
3209
3209
|
var Companion_instance_6;
|
|
3210
3210
|
function Companion_getInstance_4() {
|
|
@@ -3213,16 +3213,16 @@
|
|
|
3213
3213
|
return Companion_instance_6;
|
|
3214
3214
|
}
|
|
3215
3215
|
function sam$kotlin_Comparator$0_1(function_0) {
|
|
3216
|
-
this.
|
|
3216
|
+
this.wbc_1 = function_0;
|
|
3217
3217
|
}
|
|
3218
3218
|
protoOf(sam$kotlin_Comparator$0_1).hd = function (a, b) {
|
|
3219
|
-
return this.
|
|
3219
|
+
return this.wbc_1(a, b);
|
|
3220
3220
|
};
|
|
3221
3221
|
protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {
|
|
3222
3222
|
return this.hd(a, b);
|
|
3223
3223
|
};
|
|
3224
3224
|
protoOf(sam$kotlin_Comparator$0_1).s3 = function () {
|
|
3225
|
-
return this.
|
|
3225
|
+
return this.wbc_1;
|
|
3226
3226
|
};
|
|
3227
3227
|
protoOf(sam$kotlin_Comparator$0_1).equals = function (other) {
|
|
3228
3228
|
var tmp;
|
|
@@ -3245,18 +3245,18 @@
|
|
|
3245
3245
|
function WorldSampler$sampleOneWorld$lambda(this$0, $belief) {
|
|
3246
3246
|
return function (a, b) {
|
|
3247
3247
|
// Inline function 'kotlin.comparisons.compareValuesBy' call
|
|
3248
|
-
var tmp = entropy(this$0, $belief.
|
|
3249
|
-
var tmp$ret$1 = entropy(this$0, $belief.
|
|
3248
|
+
var tmp = entropy(this$0, $belief.zb8_1[a]);
|
|
3249
|
+
var tmp$ret$1 = entropy(this$0, $belief.zb8_1[b]);
|
|
3250
3250
|
return compareValues(tmp, tmp$ret$1);
|
|
3251
3251
|
};
|
|
3252
3252
|
}
|
|
3253
3253
|
function WorldSampler(random) {
|
|
3254
3254
|
Companion_getInstance_4();
|
|
3255
|
-
this.
|
|
3255
|
+
this.rbc_1 = random;
|
|
3256
3256
|
}
|
|
3257
|
-
protoOf(WorldSampler).
|
|
3258
|
-
var focalIndex = state.
|
|
3259
|
-
var n = state.
|
|
3257
|
+
protoOf(WorldSampler).sbc = function (state, belief, worldCount) {
|
|
3258
|
+
var focalIndex = state.bb7_1.o2(state.ab7_1);
|
|
3259
|
+
var n = state.bb7_1.g1();
|
|
3260
3260
|
// Inline function 'kotlin.collections.map' call
|
|
3261
3261
|
var this_0 = until(1, n);
|
|
3262
3262
|
// Inline function 'kotlin.collections.mapTo' call
|
|
@@ -3268,7 +3268,7 @@
|
|
|
3268
3268
|
var item = inductionVariable;
|
|
3269
3269
|
inductionVariable = inductionVariable + 1 | 0;
|
|
3270
3270
|
var absIdx = (focalIndex + item | 0) % n | 0;
|
|
3271
|
-
var tmp$ret$0 = state.
|
|
3271
|
+
var tmp$ret$0 = state.bb7_1.h1(absIdx);
|
|
3272
3272
|
destination.e1(tmp$ret$0);
|
|
3273
3273
|
}
|
|
3274
3274
|
while (!(item === last));
|
|
@@ -3279,9 +3279,9 @@
|
|
|
3279
3279
|
var _iterator__ex2g4s = opponents.t();
|
|
3280
3280
|
while (_iterator__ex2g4s.u()) {
|
|
3281
3281
|
var item_0 = _iterator__ex2g4s.v();
|
|
3282
|
-
var tmp0_elvis_lhs = state.
|
|
3282
|
+
var tmp0_elvis_lhs = state.db7_1.v2(item_0);
|
|
3283
3283
|
var played = (tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs).g1();
|
|
3284
|
-
var tmp0 = state.
|
|
3284
|
+
var tmp0 = state.eb7_1;
|
|
3285
3285
|
var tmp$ret$3;
|
|
3286
3286
|
$l$block: {
|
|
3287
3287
|
// Inline function 'kotlin.collections.count' call
|
|
@@ -3299,7 +3299,7 @@
|
|
|
3299
3299
|
var _iterator__ex2g4s_0 = tmp0.t();
|
|
3300
3300
|
while (_iterator__ex2g4s_0.u()) {
|
|
3301
3301
|
var element = _iterator__ex2g4s_0.v();
|
|
3302
|
-
if (element.
|
|
3302
|
+
if (element.x8k_1 === item_0) {
|
|
3303
3303
|
count = count + 1 | 0;
|
|
3304
3304
|
checkCountOverflow(count);
|
|
3305
3305
|
}
|
|
@@ -3307,7 +3307,7 @@
|
|
|
3307
3307
|
tmp$ret$3 = count;
|
|
3308
3308
|
}
|
|
3309
3309
|
var onTable = tmp$ret$3;
|
|
3310
|
-
var tmp$ret$5 = coerceAtLeast_0((state.
|
|
3310
|
+
var tmp$ret$5 = coerceAtLeast_0((state.wb7_1 - played | 0) - onTable | 0, 0);
|
|
3311
3311
|
destination_0.e1(tmp$ret$5);
|
|
3312
3312
|
}
|
|
3313
3313
|
var handSizes = destination_0;
|
|
@@ -3318,7 +3318,7 @@
|
|
|
3318
3318
|
var _iterator__ex2g4s_1 = opponents.t();
|
|
3319
3319
|
while (_iterator__ex2g4s_1.u()) {
|
|
3320
3320
|
var item_1 = _iterator__ex2g4s_1.v();
|
|
3321
|
-
var tmp0_elvis_lhs_0 = state.
|
|
3321
|
+
var tmp0_elvis_lhs_0 = state.qb7_1.v2(item_1);
|
|
3322
3322
|
var tmp$ret$8 = tmp0_elvis_lhs_0 == null ? emptySet() : tmp0_elvis_lhs_0;
|
|
3323
3323
|
destination_1.e1(tmp$ret$8);
|
|
3324
3324
|
}
|
|
@@ -3339,20 +3339,20 @@
|
|
|
3339
3339
|
return list;
|
|
3340
3340
|
};
|
|
3341
3341
|
function SampledWorld(hands) {
|
|
3342
|
-
this.
|
|
3342
|
+
this.ibc_1 = hands;
|
|
3343
3343
|
}
|
|
3344
3344
|
protoOf(SampledWorld).toString = function () {
|
|
3345
|
-
return 'SampledWorld(hands=' + toString_0(this.
|
|
3345
|
+
return 'SampledWorld(hands=' + toString_0(this.ibc_1) + ')';
|
|
3346
3346
|
};
|
|
3347
3347
|
protoOf(SampledWorld).hashCode = function () {
|
|
3348
|
-
return hashCode(this.
|
|
3348
|
+
return hashCode(this.ibc_1);
|
|
3349
3349
|
};
|
|
3350
3350
|
protoOf(SampledWorld).equals = function (other) {
|
|
3351
3351
|
if (this === other)
|
|
3352
3352
|
return true;
|
|
3353
3353
|
if (!(other instanceof SampledWorld))
|
|
3354
3354
|
return false;
|
|
3355
|
-
if (!equals(this.
|
|
3355
|
+
if (!equals(this.ibc_1, other.ibc_1))
|
|
3356
3356
|
return false;
|
|
3357
3357
|
return true;
|
|
3358
3358
|
};
|
|
@@ -3366,7 +3366,7 @@
|
|
|
3366
3366
|
var _iterator__ex2g4s = get_entries().t();
|
|
3367
3367
|
while (_iterator__ex2g4s.u()) {
|
|
3368
3368
|
var suit = _iterator__ex2g4s.v();
|
|
3369
|
-
var _iterator__ex2g4s_0 = Companion_getInstance_5().
|
|
3369
|
+
var _iterator__ex2g4s_0 = Companion_getInstance_5().bbd_1.t();
|
|
3370
3370
|
while (_iterator__ex2g4s_0.u()) {
|
|
3371
3371
|
var name = _iterator__ex2g4s_0.v();
|
|
3372
3372
|
cards.e1(Companion_instance_0.a6m(suit, name));
|
|
@@ -3387,7 +3387,7 @@
|
|
|
3387
3387
|
if (hand.r())
|
|
3388
3388
|
return focalPoints;
|
|
3389
3389
|
var partnerPid = getPartnerPid($this, playerId, playOrder, playersMode);
|
|
3390
|
-
var legalCards = TrickSimulator_instance.
|
|
3390
|
+
var legalCards = TrickSimulator_instance.mb9(hand, trick, trump, rules, playersMode, playerId, partnerPid);
|
|
3391
3391
|
if (legalCards.r())
|
|
3392
3392
|
return focalPoints;
|
|
3393
3393
|
var moves = legalCards === hand ? ArrayList_init_$Create$_1(legalCards) : legalCards;
|
|
@@ -3402,17 +3402,17 @@
|
|
|
3402
3402
|
trick.e1(new SimCard(playerId, card));
|
|
3403
3403
|
var tmp_0;
|
|
3404
3404
|
if (trick.g1() >= playOrder.g1()) {
|
|
3405
|
-
var trickResult = TrickSimulator_instance.
|
|
3405
|
+
var trickResult = TrickSimulator_instance.sbb(trick, trump);
|
|
3406
3406
|
var tmp_1;
|
|
3407
|
-
if (focalTeam.m2(trickResult.
|
|
3408
|
-
tmp_1 = focalPoints + trickResult.
|
|
3407
|
+
if (focalTeam.m2(trickResult.tbb_1)) {
|
|
3408
|
+
tmp_1 = focalPoints + trickResult.ubb_1 | 0;
|
|
3409
3409
|
} else {
|
|
3410
3410
|
tmp_1 = focalPoints;
|
|
3411
3411
|
}
|
|
3412
3412
|
var newFocalPts = tmp_1;
|
|
3413
3413
|
var tmp_2;
|
|
3414
|
-
if (!focalTeam.m2(trickResult.
|
|
3415
|
-
tmp_2 = oppPoints + trickResult.
|
|
3414
|
+
if (!focalTeam.m2(trickResult.tbb_1)) {
|
|
3415
|
+
tmp_2 = oppPoints + trickResult.ubb_1 | 0;
|
|
3416
3416
|
} else {
|
|
3417
3417
|
tmp_2 = oppPoints;
|
|
3418
3418
|
}
|
|
@@ -3444,7 +3444,7 @@
|
|
|
3444
3444
|
}
|
|
3445
3445
|
if (tmp$ret$0) {
|
|
3446
3446
|
var tmp_5;
|
|
3447
|
-
if (focalTeam.m2(trickResult.
|
|
3447
|
+
if (focalTeam.m2(trickResult.tbb_1)) {
|
|
3448
3448
|
tmp_5 = newFocalPts + 10 | 0;
|
|
3449
3449
|
} else {
|
|
3450
3450
|
tmp_5 = newFocalPts;
|
|
@@ -3453,7 +3453,7 @@
|
|
|
3453
3453
|
} else {
|
|
3454
3454
|
var savedTrick = ArrayList_init_$Create$_1(trick);
|
|
3455
3455
|
trick.b3();
|
|
3456
|
-
var newOrder = getPlayOrder($this, playOrder, trickResult.
|
|
3456
|
+
var newOrder = getPlayOrder($this, playOrder, trickResult.tbb_1);
|
|
3457
3457
|
var s = endgameMinimax($this, hands, trick, newOrder, 0, trump, focalTeam, newFocalPts, newOppPts, rules, playersMode, a, b);
|
|
3458
3458
|
trick.b3();
|
|
3459
3459
|
trick.i1(savedTrick);
|
|
@@ -3487,12 +3487,12 @@
|
|
|
3487
3487
|
return bestScore;
|
|
3488
3488
|
}
|
|
3489
3489
|
function computeFocalTeam($this, state) {
|
|
3490
|
-
if (state.
|
|
3491
|
-
var focalIndex = state.
|
|
3490
|
+
if (state.dbb_1.isTeamGame && state.xba_1.g1() === 4) {
|
|
3491
|
+
var focalIndex = state.xba_1.o2(state.fbb_1);
|
|
3492
3492
|
var partnerIndex = (focalIndex + 2 | 0) % 4 | 0;
|
|
3493
|
-
return setOf_0([state.
|
|
3493
|
+
return setOf_0([state.fbb_1, state.xba_1.h1(partnerIndex)]);
|
|
3494
3494
|
}
|
|
3495
|
-
return setOf(state.
|
|
3495
|
+
return setOf(state.fbb_1);
|
|
3496
3496
|
}
|
|
3497
3497
|
function getPlayOrder($this, playerOrder, leadId) {
|
|
3498
3498
|
var startIdx = coerceAtLeast_0(playerOrder.o2(leadId), 0);
|
|
@@ -3522,13 +3522,13 @@
|
|
|
3522
3522
|
}
|
|
3523
3523
|
function Companion_5() {
|
|
3524
3524
|
Companion_instance_7 = this;
|
|
3525
|
-
this.
|
|
3526
|
-
this.
|
|
3527
|
-
this.
|
|
3528
|
-
this.
|
|
3529
|
-
this.
|
|
3525
|
+
this.xbc_1 = 4;
|
|
3526
|
+
this.ybc_1 = 10;
|
|
3527
|
+
this.zbc_1 = 5;
|
|
3528
|
+
this.abd_1 = 5000;
|
|
3529
|
+
this.bbd_1 = take(get_entries_0(), 8);
|
|
3530
3530
|
var tmp = this;
|
|
3531
|
-
tmp.
|
|
3531
|
+
tmp.cbd_1 = lazy(EndgameSolver$Companion$ALL_CARDS$delegate$lambda);
|
|
3532
3532
|
}
|
|
3533
3533
|
var Companion_instance_7;
|
|
3534
3534
|
function Companion_getInstance_5() {
|
|
@@ -3539,11 +3539,11 @@
|
|
|
3539
3539
|
function EndgameSolver() {
|
|
3540
3540
|
Companion_getInstance_5();
|
|
3541
3541
|
}
|
|
3542
|
-
protoOf(EndgameSolver).
|
|
3542
|
+
protoOf(EndgameSolver).wbb = function (state, threshold) {
|
|
3543
3543
|
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
3544
|
-
if (!state.
|
|
3544
|
+
if (!state.abb_1.r())
|
|
3545
3545
|
return null;
|
|
3546
|
-
var tmp0 = state.
|
|
3546
|
+
var tmp0 = state.yba_1.x2();
|
|
3547
3547
|
var tmp$ret$1;
|
|
3548
3548
|
$l$block: {
|
|
3549
3549
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -3571,7 +3571,7 @@
|
|
|
3571
3571
|
var maxCards = tmp;
|
|
3572
3572
|
if (maxCards > threshold || maxCards === 0)
|
|
3573
3573
|
return null;
|
|
3574
|
-
var tmp0_0 = state.
|
|
3574
|
+
var tmp0_0 = state.yba_1.x2();
|
|
3575
3575
|
var tmp$ret$4;
|
|
3576
3576
|
$l$block_1: {
|
|
3577
3577
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -3604,12 +3604,12 @@
|
|
|
3604
3604
|
while (_iterator__ex2g4s_0.u()) {
|
|
3605
3605
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
3606
3606
|
var tmp_1 = sum;
|
|
3607
|
-
var tmp0_elvis_lhs_0 = state.
|
|
3607
|
+
var tmp0_elvis_lhs_0 = state.cbb_1.v2(element_0);
|
|
3608
3608
|
sum = tmp_1 + (tmp0_elvis_lhs_0 == null ? 0 : tmp0_elvis_lhs_0) | 0;
|
|
3609
3609
|
}
|
|
3610
3610
|
var focalPts = sum;
|
|
3611
3611
|
// Inline function 'kotlin.collections.filter' call
|
|
3612
|
-
var tmp0_1 = state.
|
|
3612
|
+
var tmp0_1 = state.xba_1;
|
|
3613
3613
|
// Inline function 'kotlin.collections.filterTo' call
|
|
3614
3614
|
var destination = ArrayList_init_$Create$();
|
|
3615
3615
|
var _iterator__ex2g4s_1 = tmp0_1.t();
|
|
@@ -3625,22 +3625,22 @@
|
|
|
3625
3625
|
while (_iterator__ex2g4s_2.u()) {
|
|
3626
3626
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
3627
3627
|
var tmp_2 = sum_0;
|
|
3628
|
-
var tmp0_elvis_lhs_1 = state.
|
|
3628
|
+
var tmp0_elvis_lhs_1 = state.cbb_1.v2(element_2);
|
|
3629
3629
|
sum_0 = tmp_2 + (tmp0_elvis_lhs_1 == null ? 0 : tmp0_elvis_lhs_1) | 0;
|
|
3630
3630
|
}
|
|
3631
3631
|
var oppPts = sum_0;
|
|
3632
3632
|
// Inline function 'kotlin.collections.sumOf' call
|
|
3633
3633
|
var sum_1 = 0;
|
|
3634
|
-
var _iterator__ex2g4s_3 = flatten(state.
|
|
3634
|
+
var _iterator__ex2g4s_3 = flatten(state.yba_1.x2()).t();
|
|
3635
3635
|
while (_iterator__ex2g4s_3.u()) {
|
|
3636
3636
|
var element_3 = _iterator__ex2g4s_3.v();
|
|
3637
3637
|
var tmp_3 = sum_1;
|
|
3638
|
-
sum_1 = tmp_3 + getPoint(element_3, state.
|
|
3638
|
+
sum_1 = tmp_3 + getPoint(element_3, state.zba_1) | 0;
|
|
3639
3639
|
}
|
|
3640
3640
|
var remainingCardPoints = sum_1;
|
|
3641
|
-
var playOrder = getPlayOrder(this, state.
|
|
3641
|
+
var playOrder = getPlayOrder(this, state.xba_1, state.gbb_1);
|
|
3642
3642
|
// Inline function 'kotlin.collections.mapValues' call
|
|
3643
|
-
var this_0 = state.
|
|
3643
|
+
var this_0 = state.yba_1;
|
|
3644
3644
|
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
3645
3645
|
var destination_0 = LinkedHashMap_init_$Create$_0(mapCapacity(this_0.g1()));
|
|
3646
3646
|
// Inline function 'kotlin.collections.associateByTo' call
|
|
@@ -3654,12 +3654,12 @@
|
|
|
3654
3654
|
var tmp_5 = toMutableMap(destination_0);
|
|
3655
3655
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
3656
3656
|
var tmp$ret$20 = ArrayList_init_$Create$();
|
|
3657
|
-
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.zba_1, focalTeam, focalPts, oppPts, state.ebb_1, state.dbb_1, -2147483648, 2147483647);
|
|
3658
3658
|
var totalPoints = ((focalPts + oppPts | 0) + remainingCardPoints | 0) + 10 | 0;
|
|
3659
3659
|
return new RolloutResult(focalFinalPoints, totalPoints - focalFinalPoints | 0);
|
|
3660
3660
|
};
|
|
3661
3661
|
function selectCard($this, state, legalActions) {
|
|
3662
|
-
var tmp0_elvis_lhs = state.
|
|
3662
|
+
var tmp0_elvis_lhs = state.fb7_1;
|
|
3663
3663
|
var tmp;
|
|
3664
3664
|
if (tmp0_elvis_lhs == null) {
|
|
3665
3665
|
return first(legalActions);
|
|
@@ -3683,52 +3683,52 @@
|
|
|
3683
3683
|
var _iterator__ex2g4s_0 = destination.t();
|
|
3684
3684
|
while (_iterator__ex2g4s_0.u()) {
|
|
3685
3685
|
var item = _iterator__ex2g4s_0.v();
|
|
3686
|
-
var tmp$ret$2 = item.
|
|
3686
|
+
var tmp$ret$2 = item.wb6_1;
|
|
3687
3687
|
destination_0.e1(tmp$ret$2);
|
|
3688
3688
|
}
|
|
3689
3689
|
var legalCards = destination_0;
|
|
3690
3690
|
if (legalCards.r())
|
|
3691
3691
|
return first(legalActions);
|
|
3692
3692
|
// Inline function 'kotlin.collections.map' call
|
|
3693
|
-
var this_0 = state.
|
|
3693
|
+
var this_0 = state.eb7_1;
|
|
3694
3694
|
// Inline function 'kotlin.collections.mapTo' call
|
|
3695
3695
|
var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
3696
3696
|
var _iterator__ex2g4s_1 = this_0.t();
|
|
3697
3697
|
while (_iterator__ex2g4s_1.u()) {
|
|
3698
3698
|
var item_0 = _iterator__ex2g4s_1.v();
|
|
3699
|
-
var tmp$ret$5 = new SimCard(item_0.
|
|
3699
|
+
var tmp$ret$5 = new SimCard(item_0.x8k_1, item_0.z8k_1);
|
|
3700
3700
|
destination_1.e1(tmp$ret$5);
|
|
3701
3701
|
}
|
|
3702
3702
|
var trickCards = destination_1;
|
|
3703
|
-
var focalIndex = state.
|
|
3703
|
+
var focalIndex = state.bb7_1.o2(state.ab7_1);
|
|
3704
3704
|
var tmp_0;
|
|
3705
|
-
if (state.
|
|
3706
|
-
tmp_0 = state.
|
|
3705
|
+
if (state.vb7_1.isTeamGame && state.bb7_1.g1() === 4) {
|
|
3706
|
+
tmp_0 = state.bb7_1.h1((focalIndex + 2 | 0) % 4 | 0);
|
|
3707
3707
|
} else {
|
|
3708
3708
|
tmp_0 = null;
|
|
3709
3709
|
}
|
|
3710
3710
|
var partnerPid = tmp_0;
|
|
3711
3711
|
var partnerWinning = isPartnerWinning_0($this, trickCards, partnerPid, trump);
|
|
3712
|
-
var tmp_1 = flatten(state.
|
|
3712
|
+
var tmp_1 = flatten(state.db7_1.x2());
|
|
3713
3713
|
// Inline function 'kotlin.collections.map' call
|
|
3714
|
-
var this_1 = state.
|
|
3714
|
+
var this_1 = state.eb7_1;
|
|
3715
3715
|
// Inline function 'kotlin.collections.mapTo' call
|
|
3716
3716
|
var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
|
|
3717
3717
|
var _iterator__ex2g4s_2 = this_1.t();
|
|
3718
3718
|
while (_iterator__ex2g4s_2.u()) {
|
|
3719
3719
|
var item_1 = _iterator__ex2g4s_2.v();
|
|
3720
|
-
var tmp$ret$8 = item_1.
|
|
3720
|
+
var tmp$ret$8 = item_1.z8k_1;
|
|
3721
3721
|
destination_2.e1(tmp$ret$8);
|
|
3722
3722
|
}
|
|
3723
3723
|
var released = plus_0(tmp_1, destination_2);
|
|
3724
3724
|
// Inline function 'kotlin.collections.filter' call
|
|
3725
|
-
var tmp0 = state.
|
|
3725
|
+
var tmp0 = state.qb7_1.m1();
|
|
3726
3726
|
// Inline function 'kotlin.collections.filterTo' call
|
|
3727
3727
|
var destination_3 = ArrayList_init_$Create$();
|
|
3728
3728
|
var _iterator__ex2g4s_3 = tmp0.t();
|
|
3729
3729
|
while (_iterator__ex2g4s_3.u()) {
|
|
3730
3730
|
var element_0 = _iterator__ex2g4s_3.v();
|
|
3731
|
-
if (!(element_0.n1() === state.
|
|
3731
|
+
if (!(element_0.n1() === state.ab7_1)) {
|
|
3732
3732
|
destination_3.e1(element_0);
|
|
3733
3733
|
}
|
|
3734
3734
|
}
|
|
@@ -3742,13 +3742,13 @@
|
|
|
3742
3742
|
addAll(destination_4, list);
|
|
3743
3743
|
}
|
|
3744
3744
|
var oppVoids = toSet(destination_4);
|
|
3745
|
-
var card = $this.
|
|
3745
|
+
var card = $this.dbd_1.rbb(state.cb7_1, legalCards, trickCards, trump, partnerPid, partnerWinning, VOID, released, oppVoids);
|
|
3746
3746
|
return new PlayCard(card);
|
|
3747
3747
|
}
|
|
3748
3748
|
function isPartnerWinning_0($this, trickCards, partnerPid, trump) {
|
|
3749
3749
|
if (partnerPid == null || trickCards.r())
|
|
3750
3750
|
return false;
|
|
3751
|
-
var firstSuit = first(trickCards).
|
|
3751
|
+
var firstSuit = first(trickCards).kbb_1.x6l();
|
|
3752
3752
|
var tmp$ret$0;
|
|
3753
3753
|
$l$block_0: {
|
|
3754
3754
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
@@ -3763,10 +3763,10 @@
|
|
|
3763
3763
|
break $l$block_0;
|
|
3764
3764
|
}
|
|
3765
3765
|
var it = maxElem;
|
|
3766
|
-
var maxValue = getGrowth(it.
|
|
3766
|
+
var maxValue = getGrowth(it.kbb_1, trump, firstSuit);
|
|
3767
3767
|
do {
|
|
3768
3768
|
var e = iterator.v();
|
|
3769
|
-
var v = getGrowth(e.
|
|
3769
|
+
var v = getGrowth(e.kbb_1, trump, firstSuit);
|
|
3770
3770
|
if (compareTo(maxValue, v) < 0) {
|
|
3771
3771
|
maxElem = e;
|
|
3772
3772
|
maxValue = v;
|
|
@@ -3776,15 +3776,15 @@
|
|
|
3776
3776
|
tmp$ret$0 = maxElem;
|
|
3777
3777
|
}
|
|
3778
3778
|
var winner = tmp$ret$0;
|
|
3779
|
-
return (winner == null ? null : winner.
|
|
3779
|
+
return (winner == null ? null : winner.jbb_1) == partnerPid;
|
|
3780
3780
|
}
|
|
3781
3781
|
function HeuristicBotPolicy(circle1Threshold, circle2Threshold) {
|
|
3782
3782
|
circle1Threshold = circle1Threshold === VOID ? null : circle1Threshold;
|
|
3783
3783
|
circle2Threshold = circle2Threshold === VOID ? null : circle2Threshold;
|
|
3784
|
-
this.
|
|
3785
|
-
this.
|
|
3784
|
+
this.dbd_1 = new RolloutPolicy();
|
|
3785
|
+
this.ebd_1 = new SuitSelectionPolicy(VOID, circle1Threshold, circle2Threshold);
|
|
3786
3786
|
}
|
|
3787
|
-
protoOf(HeuristicBotPolicy).
|
|
3787
|
+
protoOf(HeuristicBotPolicy).rb9 = function (state, legalActions) {
|
|
3788
3788
|
if (legalActions.g1() === 1)
|
|
3789
3789
|
return first(legalActions);
|
|
3790
3790
|
var tmp;
|
|
@@ -3838,7 +3838,7 @@
|
|
|
3838
3838
|
tmp$ret$2 = false;
|
|
3839
3839
|
}
|
|
3840
3840
|
if (tmp$ret$2) {
|
|
3841
|
-
tmp = this.
|
|
3841
|
+
tmp = this.ebd_1.ibd(state, legalActions);
|
|
3842
3842
|
} else {
|
|
3843
3843
|
var tmp$ret$4;
|
|
3844
3844
|
$l$block_4: {
|
|
@@ -3872,7 +3872,7 @@
|
|
|
3872
3872
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
3873
3873
|
var tmp_3;
|
|
3874
3874
|
if (element_2 instanceof AcceptCombinations) {
|
|
3875
|
-
tmp_3 = element_2.
|
|
3875
|
+
tmp_3 = element_2.zb6_1;
|
|
3876
3876
|
} else {
|
|
3877
3877
|
tmp_3 = false;
|
|
3878
3878
|
}
|
|
@@ -3902,10 +3902,10 @@
|
|
|
3902
3902
|
return PimcBotPolicy_init_$Init$(pimcEngine, circle1Threshold, circle2Threshold, objectCreate(protoOf(PimcBotPolicy)));
|
|
3903
3903
|
}
|
|
3904
3904
|
function PimcBotPolicy(pimcEngine, suitSelectionPolicy) {
|
|
3905
|
-
this.
|
|
3906
|
-
this.
|
|
3905
|
+
this.jbd_1 = pimcEngine;
|
|
3906
|
+
this.kbd_1 = suitSelectionPolicy;
|
|
3907
3907
|
}
|
|
3908
|
-
protoOf(PimcBotPolicy).
|
|
3908
|
+
protoOf(PimcBotPolicy).rb9 = function (state, legalActions) {
|
|
3909
3909
|
if (legalActions.g1() === 1)
|
|
3910
3910
|
return first(legalActions);
|
|
3911
3911
|
var tmp;
|
|
@@ -3933,7 +3933,7 @@
|
|
|
3933
3933
|
tmp$ret$0 = false;
|
|
3934
3934
|
}
|
|
3935
3935
|
if (tmp$ret$0) {
|
|
3936
|
-
var scores = this.
|
|
3936
|
+
var scores = this.jbd_1.qbc(state, legalActions);
|
|
3937
3937
|
// Inline function 'kotlin.collections.maxByOrNull' call
|
|
3938
3938
|
var tmp0 = scores.m1();
|
|
3939
3939
|
var tmp$ret$2;
|
|
@@ -3989,7 +3989,7 @@
|
|
|
3989
3989
|
tmp$ret$6 = false;
|
|
3990
3990
|
}
|
|
3991
3991
|
if (tmp$ret$6) {
|
|
3992
|
-
tmp = this.
|
|
3992
|
+
tmp = this.kbd_1.ibd(state, legalActions);
|
|
3993
3993
|
} else {
|
|
3994
3994
|
var tmp$ret$8;
|
|
3995
3995
|
$l$block_6: {
|
|
@@ -4023,7 +4023,7 @@
|
|
|
4023
4023
|
var element_2 = _iterator__ex2g4s_2.v();
|
|
4024
4024
|
var tmp_3;
|
|
4025
4025
|
if (element_2 instanceof AcceptCombinations) {
|
|
4026
|
-
tmp_3 = element_2.
|
|
4026
|
+
tmp_3 = element_2.zb6_1;
|
|
4027
4027
|
} else {
|
|
4028
4028
|
tmp_3 = false;
|
|
4029
4029
|
}
|
|
@@ -4303,7 +4303,7 @@
|
|
|
4303
4303
|
var _iterator__ex2g4s = legalCards.t();
|
|
4304
4304
|
while (_iterator__ex2g4s.u()) {
|
|
4305
4305
|
var element = _iterator__ex2g4s.v();
|
|
4306
|
-
if (!element.x6l().equals(trump) && Companion_getInstance_6().
|
|
4306
|
+
if (!element.x6l().equals(trump) && Companion_getInstance_6().obd_1.m2(element.m())) {
|
|
4307
4307
|
destination.e1(element);
|
|
4308
4308
|
}
|
|
4309
4309
|
}
|
|
@@ -4601,7 +4601,7 @@
|
|
|
4601
4601
|
var tmp5_elvis_lhs = tmp_4;
|
|
4602
4602
|
var releasedTrumps = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
|
|
4603
4603
|
var accountedTrumps = myTrumps.g1() + releasedTrumps | 0;
|
|
4604
|
-
var trumpsMostlyGone = accountedTrumps >= Companion_getInstance_6().
|
|
4604
|
+
var trumpsMostlyGone = accountedTrumps >= Companion_getInstance_6().nbd_1;
|
|
4605
4605
|
// Inline function 'kotlin.collections.filter' call
|
|
4606
4606
|
// Inline function 'kotlin.collections.filterTo' call
|
|
4607
4607
|
var destination_5 = ArrayList_init_$Create$();
|
|
@@ -5098,7 +5098,7 @@
|
|
|
5098
5098
|
while (_iterator__ex2g4s.u()) {
|
|
5099
5099
|
var element = _iterator__ex2g4s.v();
|
|
5100
5100
|
// Inline function 'kotlin.collections.takeWhile' call
|
|
5101
|
-
var this_0 = Companion_getInstance_6().
|
|
5101
|
+
var this_0 = Companion_getInstance_6().pbd_1;
|
|
5102
5102
|
var list = ArrayList_init_$Create$();
|
|
5103
5103
|
var _iterator__ex2g4s_0 = this_0.t();
|
|
5104
5104
|
$l$loop: while (_iterator__ex2g4s_0.u()) {
|
|
@@ -5217,7 +5217,7 @@
|
|
|
5217
5217
|
return tmp$ret$11;
|
|
5218
5218
|
}
|
|
5219
5219
|
function selectFollow($this, hand, legalCards, currentTrick, trump, partnerWinning) {
|
|
5220
|
-
var firstSuit = first(currentTrick).
|
|
5220
|
+
var firstSuit = first(currentTrick).kbb_1.x6l();
|
|
5221
5221
|
if (partnerWinning) {
|
|
5222
5222
|
var tmp$ret$0;
|
|
5223
5223
|
$l$block_0: {
|
|
@@ -5253,10 +5253,10 @@
|
|
|
5253
5253
|
if (!iterator_0.u())
|
|
5254
5254
|
throw NoSuchElementException_init_$Create$();
|
|
5255
5255
|
var it_0 = iterator_0.v();
|
|
5256
|
-
var maxValue = getGrowth(it_0.
|
|
5256
|
+
var maxValue = getGrowth(it_0.kbb_1, trump, firstSuit);
|
|
5257
5257
|
while (iterator_0.u()) {
|
|
5258
5258
|
var it_1 = iterator_0.v();
|
|
5259
|
-
var v_0 = getGrowth(it_1.
|
|
5259
|
+
var v_0 = getGrowth(it_1.kbb_1, trump, firstSuit);
|
|
5260
5260
|
if (compareTo(maxValue, v_0) < 0) {
|
|
5261
5261
|
maxValue = v_0;
|
|
5262
5262
|
}
|
|
@@ -5381,11 +5381,11 @@
|
|
|
5381
5381
|
}
|
|
5382
5382
|
function Companion_6() {
|
|
5383
5383
|
Companion_instance_8 = this;
|
|
5384
|
-
this.
|
|
5385
|
-
this.
|
|
5386
|
-
this.
|
|
5387
|
-
this.
|
|
5388
|
-
this.
|
|
5384
|
+
this.lbd_1 = 8;
|
|
5385
|
+
this.mbd_1 = 3;
|
|
5386
|
+
this.nbd_1 = numberToInt(8 * 0.8);
|
|
5387
|
+
this.obd_1 = setOf_0([CardName_KING_getInstance(), CardName_QUEEN_getInstance()]);
|
|
5388
|
+
this.pbd_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()]);
|
|
5389
5389
|
}
|
|
5390
5390
|
var Companion_instance_8;
|
|
5391
5391
|
function Companion_getInstance_6() {
|
|
@@ -5394,16 +5394,16 @@
|
|
|
5394
5394
|
return Companion_instance_8;
|
|
5395
5395
|
}
|
|
5396
5396
|
function sam$kotlin_Comparator$0_2(function_0) {
|
|
5397
|
-
this.
|
|
5397
|
+
this.qbd_1 = function_0;
|
|
5398
5398
|
}
|
|
5399
5399
|
protoOf(sam$kotlin_Comparator$0_2).hd = function (a, b) {
|
|
5400
|
-
return this.
|
|
5400
|
+
return this.qbd_1(a, b);
|
|
5401
5401
|
};
|
|
5402
5402
|
protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {
|
|
5403
5403
|
return this.hd(a, b);
|
|
5404
5404
|
};
|
|
5405
5405
|
protoOf(sam$kotlin_Comparator$0_2).s3 = function () {
|
|
5406
|
-
return this.
|
|
5406
|
+
return this.qbd_1;
|
|
5407
5407
|
};
|
|
5408
5408
|
protoOf(sam$kotlin_Comparator$0_2).equals = function (other) {
|
|
5409
5409
|
var tmp;
|
|
@@ -5424,16 +5424,16 @@
|
|
|
5424
5424
|
return hashCode(this.s3());
|
|
5425
5425
|
};
|
|
5426
5426
|
function sam$kotlin_Comparator$0_3(function_0) {
|
|
5427
|
-
this.
|
|
5427
|
+
this.rbd_1 = function_0;
|
|
5428
5428
|
}
|
|
5429
5429
|
protoOf(sam$kotlin_Comparator$0_3).hd = function (a, b) {
|
|
5430
|
-
return this.
|
|
5430
|
+
return this.rbd_1(a, b);
|
|
5431
5431
|
};
|
|
5432
5432
|
protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {
|
|
5433
5433
|
return this.hd(a, b);
|
|
5434
5434
|
};
|
|
5435
5435
|
protoOf(sam$kotlin_Comparator$0_3).s3 = function () {
|
|
5436
|
-
return this.
|
|
5436
|
+
return this.rbd_1;
|
|
5437
5437
|
};
|
|
5438
5438
|
protoOf(sam$kotlin_Comparator$0_3).equals = function (other) {
|
|
5439
5439
|
var tmp;
|
|
@@ -5454,16 +5454,16 @@
|
|
|
5454
5454
|
return hashCode(this.s3());
|
|
5455
5455
|
};
|
|
5456
5456
|
function sam$kotlin_Comparator$0_4(function_0) {
|
|
5457
|
-
this.
|
|
5457
|
+
this.sbd_1 = function_0;
|
|
5458
5458
|
}
|
|
5459
5459
|
protoOf(sam$kotlin_Comparator$0_4).hd = function (a, b) {
|
|
5460
|
-
return this.
|
|
5460
|
+
return this.sbd_1(a, b);
|
|
5461
5461
|
};
|
|
5462
5462
|
protoOf(sam$kotlin_Comparator$0_4).compare = function (a, b) {
|
|
5463
5463
|
return this.hd(a, b);
|
|
5464
5464
|
};
|
|
5465
5465
|
protoOf(sam$kotlin_Comparator$0_4).s3 = function () {
|
|
5466
|
-
return this.
|
|
5466
|
+
return this.sbd_1;
|
|
5467
5467
|
};
|
|
5468
5468
|
protoOf(sam$kotlin_Comparator$0_4).equals = function (other) {
|
|
5469
5469
|
var tmp;
|
|
@@ -5484,16 +5484,16 @@
|
|
|
5484
5484
|
return hashCode(this.s3());
|
|
5485
5485
|
};
|
|
5486
5486
|
function sam$kotlin_Comparator$0_5(function_0) {
|
|
5487
|
-
this.
|
|
5487
|
+
this.tbd_1 = function_0;
|
|
5488
5488
|
}
|
|
5489
5489
|
protoOf(sam$kotlin_Comparator$0_5).hd = function (a, b) {
|
|
5490
|
-
return this.
|
|
5490
|
+
return this.tbd_1(a, b);
|
|
5491
5491
|
};
|
|
5492
5492
|
protoOf(sam$kotlin_Comparator$0_5).compare = function (a, b) {
|
|
5493
5493
|
return this.hd(a, b);
|
|
5494
5494
|
};
|
|
5495
5495
|
protoOf(sam$kotlin_Comparator$0_5).s3 = function () {
|
|
5496
|
-
return this.
|
|
5496
|
+
return this.tbd_1;
|
|
5497
5497
|
};
|
|
5498
5498
|
protoOf(sam$kotlin_Comparator$0_5).equals = function (other) {
|
|
5499
5499
|
var tmp;
|
|
@@ -5514,16 +5514,16 @@
|
|
|
5514
5514
|
return hashCode(this.s3());
|
|
5515
5515
|
};
|
|
5516
5516
|
function sam$kotlin_Comparator$0_6(function_0) {
|
|
5517
|
-
this.
|
|
5517
|
+
this.ubd_1 = function_0;
|
|
5518
5518
|
}
|
|
5519
5519
|
protoOf(sam$kotlin_Comparator$0_6).hd = function (a, b) {
|
|
5520
|
-
return this.
|
|
5520
|
+
return this.ubd_1(a, b);
|
|
5521
5521
|
};
|
|
5522
5522
|
protoOf(sam$kotlin_Comparator$0_6).compare = function (a, b) {
|
|
5523
5523
|
return this.hd(a, b);
|
|
5524
5524
|
};
|
|
5525
5525
|
protoOf(sam$kotlin_Comparator$0_6).s3 = function () {
|
|
5526
|
-
return this.
|
|
5526
|
+
return this.ubd_1;
|
|
5527
5527
|
};
|
|
5528
5528
|
protoOf(sam$kotlin_Comparator$0_6).equals = function (other) {
|
|
5529
5529
|
var tmp;
|
|
@@ -5998,7 +5998,7 @@
|
|
|
5998
5998
|
function RolloutPolicy() {
|
|
5999
5999
|
Companion_getInstance_6();
|
|
6000
6000
|
}
|
|
6001
|
-
protoOf(RolloutPolicy).
|
|
6001
|
+
protoOf(RolloutPolicy).vbd = function (hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids) {
|
|
6002
6002
|
if (legalCards.g1() === 1)
|
|
6003
6003
|
return first(legalCards);
|
|
6004
6004
|
var tmp;
|
|
@@ -6015,11 +6015,11 @@
|
|
|
6015
6015
|
}
|
|
6016
6016
|
return tmp;
|
|
6017
6017
|
};
|
|
6018
|
-
protoOf(RolloutPolicy).
|
|
6018
|
+
protoOf(RolloutPolicy).rbb = function (hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids, $super) {
|
|
6019
6019
|
opponentCards = opponentCards === VOID ? null : opponentCards;
|
|
6020
6020
|
releasedCards = releasedCards === VOID ? null : releasedCards;
|
|
6021
6021
|
opponentVoids = opponentVoids === VOID ? null : opponentVoids;
|
|
6022
|
-
return $super === VOID ? this.
|
|
6022
|
+
return $super === VOID ? this.vbd(hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids) : $super.vbd.call(this, hand, legalCards, currentTrick, trump, partnerPlayerId, partnerWinning, opponentCards, releasedCards, opponentVoids);
|
|
6023
6023
|
};
|
|
6024
6024
|
function buildEffectiveCards($this, ownCards, trumpCard, suit, circle) {
|
|
6025
6025
|
if (!(circle === 1) || trumpCard == null || !trumpCard.x6l().equals(suit))
|
|
@@ -6027,9 +6027,9 @@
|
|
|
6027
6027
|
return plus(ownCards, trumpCard);
|
|
6028
6028
|
}
|
|
6029
6029
|
function evaluateSuit($this, effectiveCards, trump, trumpCard) {
|
|
6030
|
-
var trumpControl = $this.
|
|
6031
|
-
var sideSuitPower = $this.
|
|
6032
|
-
var distributionBonus = $this.
|
|
6030
|
+
var trumpControl = $this.fbd_1.eag(effectiveCards, trump);
|
|
6031
|
+
var sideSuitPower = $this.fbd_1.fag(effectiveCards, trump);
|
|
6032
|
+
var distributionBonus = $this.fbd_1.gag(effectiveCards, trump);
|
|
6033
6033
|
var tmp;
|
|
6034
6034
|
if (!(trumpCard == null) && trumpCard.x6l().equals(trump)) {
|
|
6035
6035
|
tmp = getPoint(trumpCard, trump);
|
|
@@ -6040,10 +6040,10 @@
|
|
|
6040
6040
|
return trumpControl + sideSuitPower + distributionBonus + trumpCardPointBonus;
|
|
6041
6041
|
}
|
|
6042
6042
|
function getThreshold($this, mode, circle) {
|
|
6043
|
-
if (circle <= 1 && !($this.
|
|
6044
|
-
return $this.
|
|
6045
|
-
if (circle > 1 && !($this.
|
|
6046
|
-
return $this.
|
|
6043
|
+
if (circle <= 1 && !($this.gbd_1 == null))
|
|
6044
|
+
return $this.gbd_1;
|
|
6045
|
+
if (circle > 1 && !($this.hbd_1 == null))
|
|
6046
|
+
return $this.hbd_1;
|
|
6047
6047
|
var _destruct__k2r9zo;
|
|
6048
6048
|
switch (mode.a1_1) {
|
|
6049
6049
|
case 0:
|
|
@@ -6064,11 +6064,11 @@
|
|
|
6064
6064
|
calculator = calculator === VOID ? new HandStrengthCalculatorImpl() : calculator;
|
|
6065
6065
|
circle1Override = circle1Override === VOID ? null : circle1Override;
|
|
6066
6066
|
circle2Override = circle2Override === VOID ? null : circle2Override;
|
|
6067
|
-
this.
|
|
6068
|
-
this.
|
|
6069
|
-
this.
|
|
6067
|
+
this.fbd_1 = calculator;
|
|
6068
|
+
this.gbd_1 = circle1Override;
|
|
6069
|
+
this.hbd_1 = circle2Override;
|
|
6070
6070
|
}
|
|
6071
|
-
protoOf(SuitSelectionPolicy).
|
|
6071
|
+
protoOf(SuitSelectionPolicy).ibd = function (state, legalActions) {
|
|
6072
6072
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
6073
6073
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
6074
6074
|
var destination = ArrayList_init_$Create$();
|
|
@@ -6090,7 +6090,7 @@
|
|
|
6090
6090
|
var _iterator__ex2g4s_0 = suitActions.t();
|
|
6091
6091
|
while (_iterator__ex2g4s_0.u()) {
|
|
6092
6092
|
var element_0 = _iterator__ex2g4s_0.v();
|
|
6093
|
-
if (element_0.
|
|
6093
|
+
if (element_0.yb6_1 == null) {
|
|
6094
6094
|
tmp$ret$3 = element_0;
|
|
6095
6095
|
break $l$block;
|
|
6096
6096
|
}
|
|
@@ -6104,7 +6104,7 @@
|
|
|
6104
6104
|
var _iterator__ex2g4s_1 = suitActions.t();
|
|
6105
6105
|
while (_iterator__ex2g4s_1.u()) {
|
|
6106
6106
|
var element_1 = _iterator__ex2g4s_1.v();
|
|
6107
|
-
if (!(element_1.
|
|
6107
|
+
if (!(element_1.yb6_1 == null)) {
|
|
6108
6108
|
destination_0.e1(element_1);
|
|
6109
6109
|
}
|
|
6110
6110
|
}
|
|
@@ -6113,10 +6113,10 @@
|
|
|
6113
6113
|
return passAction == null ? first(suitActions) : passAction;
|
|
6114
6114
|
}
|
|
6115
6115
|
var tmp;
|
|
6116
|
-
if (state.
|
|
6116
|
+
if (state.ib7_1.r()) {
|
|
6117
6117
|
tmp = 1;
|
|
6118
6118
|
} else {
|
|
6119
|
-
var tmp0 = state.
|
|
6119
|
+
var tmp0 = state.ib7_1;
|
|
6120
6120
|
var tmp$ret$7;
|
|
6121
6121
|
$l$block_0: {
|
|
6122
6122
|
// Inline function 'kotlin.collections.maxOfOrNull' call
|
|
@@ -6125,9 +6125,9 @@
|
|
|
6125
6125
|
tmp$ret$7 = null;
|
|
6126
6126
|
break $l$block_0;
|
|
6127
6127
|
}
|
|
6128
|
-
var maxValue = iterator.v().
|
|
6128
|
+
var maxValue = iterator.v().ab8_1;
|
|
6129
6129
|
while (iterator.u()) {
|
|
6130
|
-
var v = iterator.v().
|
|
6130
|
+
var v = iterator.v().ab8_1;
|
|
6131
6131
|
if (compareTo(maxValue, v) < 0) {
|
|
6132
6132
|
maxValue = v;
|
|
6133
6133
|
}
|
|
@@ -6138,7 +6138,7 @@
|
|
|
6138
6138
|
tmp = tmp2_elvis_lhs == null ? 1 : tmp2_elvis_lhs;
|
|
6139
6139
|
}
|
|
6140
6140
|
var circle = tmp;
|
|
6141
|
-
var threshold = getThreshold(this, state.
|
|
6141
|
+
var threshold = getThreshold(this, state.vb7_1, circle);
|
|
6142
6142
|
var bestSuit = null;
|
|
6143
6143
|
var bestScore = 0.0;
|
|
6144
6144
|
var bestUngatedSuit = null;
|
|
@@ -6146,7 +6146,7 @@
|
|
|
6146
6146
|
var _iterator__ex2g4s_2 = declareActions.t();
|
|
6147
6147
|
$l$loop_0: while (_iterator__ex2g4s_2.u()) {
|
|
6148
6148
|
var action = _iterator__ex2g4s_2.v();
|
|
6149
|
-
var tmp3_elvis_lhs = action.
|
|
6149
|
+
var tmp3_elvis_lhs = action.yb6_1;
|
|
6150
6150
|
var tmp_0;
|
|
6151
6151
|
if (tmp3_elvis_lhs == null) {
|
|
6152
6152
|
continue $l$loop_0;
|
|
@@ -6154,13 +6154,13 @@
|
|
|
6154
6154
|
tmp_0 = tmp3_elvis_lhs;
|
|
6155
6155
|
}
|
|
6156
6156
|
var suit = tmp_0;
|
|
6157
|
-
var effectiveCards = buildEffectiveCards(this, state.
|
|
6158
|
-
var score = evaluateSuit(this, effectiveCards, suit, state.
|
|
6157
|
+
var effectiveCards = buildEffectiveCards(this, state.cb7_1, state.gb7_1, suit, circle);
|
|
6158
|
+
var score = evaluateSuit(this, effectiveCards, suit, state.gb7_1);
|
|
6159
6159
|
if (score > bestUngatedScore) {
|
|
6160
6160
|
bestUngatedScore = score;
|
|
6161
6161
|
bestUngatedSuit = suit;
|
|
6162
6162
|
}
|
|
6163
|
-
if (!this.
|
|
6163
|
+
if (!this.wbd(effectiveCards, suit, circle))
|
|
6164
6164
|
continue $l$loop_0;
|
|
6165
6165
|
if (score > bestScore) {
|
|
6166
6166
|
bestScore = score;
|
|
@@ -6178,7 +6178,7 @@
|
|
|
6178
6178
|
}
|
|
6179
6179
|
return tmp_1;
|
|
6180
6180
|
};
|
|
6181
|
-
protoOf(SuitSelectionPolicy).
|
|
6181
|
+
protoOf(SuitSelectionPolicy).wbd = function (effectiveCards, trump, circle) {
|
|
6182
6182
|
// Inline function 'kotlin.collections.filter' call
|
|
6183
6183
|
// Inline function 'kotlin.collections.filterTo' call
|
|
6184
6184
|
var destination = ArrayList_init_$Create$();
|