Commit Graph

24 Commits (2733516cb9cdad7ac4cef98b819d4d01846e5c66)

Author SHA1 Message Date
Leandro Doctors 2733516cb9 Organize imports 2020-01-16 08:21:24 +08:00
Martin Petricek bd5ae5fd7a Refactoring (#1543)
* Fix typos.

* Remove unnecessary boxing/unboxing.

* Replace traditional 'for' loops with 'foreach' loops.

* Replace explicit types with <> (diamonds) where they can be inferred.

* Collapse identical catch branches.

* Replace statement lambda with expression lambda for short statements.

* Remove unnecessary imports.

* Replace some lambdas with Comparator.comparing

* Replace Runnables with lambdas.

* Use addAll instead of adding whole collection manually.

* Simplify boolean expressions.

* Remove redundant 'else'.

* Simplify some boolean conditions that are always true or false.

* Inline redundant local variables.

* Remove extraneous semicolons.

* Fix Javadoc errors.

* Replace anonymous classes with lambdas.

* Replace chain of 'if's with switch.

* Remove delaration of exception that is never thrown.

* Use String/StringBuilder properly.
2018-04-08 08:59:14 +08:00
lodici 2660653acb adds "--threads" command line arg to limit threads used by AI when running simulated games. 2017-05-09 23:02:55 +01:00
lodici 0c1a7d5ae8 remove unused import statements and sort. 2017-04-08 08:26:41 +01:00
melvinzhang c8f1262b45 remove trailing space from java code 2015-12-31 18:54:52 +08:00
melvinzhang 039e39c9f3 remove AI specific methods from PlayerProfile, add MagicPlayer.getAiProfile convenience method 2015-04-04 21:46:34 +08:00
melvinzhang 147be0efdc retrieve AI level from player profile 2015-04-04 21:46:33 +08:00
melvinzhang 27d62484fe enable fast choices at start as choices are passed as arguments 2015-02-22 16:44:15 +08:00
melvinzhang 0b7c5f6697 make use of advanceToNextEventWithChoices to skip event with single choice 2015-02-22 16:41:39 +08:00
melvinzhang a56a7f5617 only decrease depth when there is more than one child node 2015-02-22 16:20:39 +08:00
melvinzhang 533dcb7f19 move end time into member END and add method hasTime which is checked in tree search 2015-02-21 21:56:11 +08:00
melvinzhang 226aa3ebd3 show value of CHEAT in MTDF log output 2015-02-21 14:28:24 +08:00
melvinzhang c526c22fc9 add cheat/honest version of MTDF 2015-02-21 12:39:22 +08:00
melvinzhang 38b9d50dab improve estimatination of when to terminate 2015-02-21 12:36:12 +08:00
melvinzhang 1e47fda141 enable fast choices for levels below the first 2015-02-21 10:13:48 +08:00
melvinzhang 0e82ab4dc3 remove search depth, stop base on time limit 2015-02-21 10:12:53 +08:00
melvinzhang 8349e0af7f use getStateId to reduce id collision and fix id change after undo, AI now plays creatures properly 2015-02-21 09:48:50 +08:00
melvinzhang 72cde447c4 fix name of AI in log message 2015-02-21 09:48:07 +08:00
melvinzhang 0085f618f2 remove manual debug add log method 2015-02-20 23:13:52 +08:00
melvinzhang ff4c188f3e integrate MTDF with MagicGame, fails id_check due to MagicPermanent having different ids 2015-02-20 20:35:46 +08:00
melvinzhang d69172805d convert do/while loop to while loop 2015-02-20 13:16:13 +08:00
melvinzhang 8f427b38d9 fill in MTDF implementation and add stubs 2015-02-20 13:07:41 +08:00
ShawnieBoy b611eaae48 Import reorganise/remove unused 2014-04-18 22:43:01 +01:00
melvin 973b44c4ea added stub for MTD(f) AI 2013-03-08 11:02:14 +08:00