Commit graph

83 commits

Author SHA1 Message Date
e602f2a41a
Add check for draw pile size 2024-06-14 11:18:24 +02:00
2388c57d5e
bugfix: parse score goal
Boost parses uint8_t as chars, not as numbers,
so 'unsigned int' is used for parsing instead.
2024-06-05 17:34:45 +02:00
b966475045
Fix: Allow user to strikeout 2024-03-15 14:57:38 +01:00
9af42a43a4
reduce number of map lookups 2024-02-10 00:27:00 +01:00
5c4a2bb4f7
Store rationals without denominator
Instead of storing a rational for evey game state,
we just store how many of the factorial(draw pile size) many
game states can be won.
This allows us to save only one 64-bit integer per game state instead of
two and thus reduces memory consumption of the program significantly.
Also, this makes some computations a bit easier, since we do not have to
normalize when recursing - we can just add the numbe of winnable states
for each possible draw.

On the other hand, this means that upon lookup, we have to normalize the
stored values again to retrieve the probabilities.
In particular, one needs to know what the draw pile size of the game
state is in order to interpret the value of the state.
2024-02-09 15:58:15 +01:00
afb6fee540
intoduce CLI option to reduce memory consumption 2024-02-08 22:08:44 +01:00
bfc731ae36
Introduce option for HanabiState to save memory 2024-02-08 21:54:39 +01:00
27922de8e8
introduce function to select which states to save to map 2024-02-08 21:44:57 +01:00
f0a496a8f0
Use parallel_hashmap library for better performance
This drastically reduces memory usage and also gains some performance.
Since this is a drop-in replacement, there is essentially no downside in
using this.
2024-02-07 19:52:02 +01:00
5507f8e5dc
Introduce using directive for map type
This sets up for quick testing of different maps with the same interface
2024-02-07 18:59:08 +01:00
80290a85f9
add missing files for version generation 2024-02-05 22:28:15 +01:00
9d1d27d65c
deactivate debug macro 2024-02-05 22:20:40 +01:00
742266fe82
Include version information into program 2024-02-03 13:21:58 +01:00
47d59464cd
backtracking: consider striking at 8 clues 2024-02-01 22:26:08 +01:00
863baf3acd
consider playing trash at 8 clues 2024-01-17 18:22:20 +01:00
191e74e45f
Use C++17 to support older compilers 2024-01-14 18:04:27 +01:00
d6474bb19d
improve return codes 2024-01-13 14:37:16 +01:00
84b95e7214
expand getting actions: include non-reasonable actions on request 2024-01-13 00:48:57 +01:00
35b78cb4db
Implement option to list all actions in replay 2024-01-12 23:21:58 +01:00
cdf8575283
Fix id clashes: Normalize all card positions 2024-01-12 23:07:36 +01:00
6a663563a3
remove semicolons 2024-01-12 18:22:48 +01:00
4f1e41a80a
simplify code 2024-01-12 18:05:15 +01:00
3c1fa0d0e4
Disable integrity checks by default
This should speed up the program drastically
2024-01-12 17:40:21 +01:00
835bf3421b
remove print 2024-01-12 15:59:51 +01:00
8398173939
implement discarding dupes and sacrifice discards 2024-01-12 15:18:30 +01:00
43477b1023
better state printing: ignore trash 2024-01-12 14:59:47 +01:00
e18937c599
Revert "add card orders to deck"
This reverts commit 8b42819704.
2024-01-12 14:51:13 +01:00
4ba61b0450
implement criticality of cards 2024-01-12 14:27:16 +01:00
8b42819704
add card orders to deck 2024-01-09 15:07:14 +01:00
c6a7eec903
fix assertions and when to consider stalling 2024-01-09 04:13:13 +01:00
486e459c68
handle CS games on download 2024-01-09 02:21:01 +01:00
5b6e877a51
add debug macro 2024-01-09 01:10:27 +01:00
930ba9b408
game_state: support clue starved variants 2024-01-09 01:10:19 +01:00
c7eac217a8
Implement missing output operator 2023-11-24 16:11:36 +01:00
8cc30eb270
add comments 2023-11-16 16:29:41 +01:00
3eea38ae05
fix comments 2023-11-16 16:22:49 +01:00
ea881c5e6a
reformat code 2023-11-16 16:20:04 +01:00
43b4bec7c6
simplify functions 2023-11-16 16:03:42 +01:00
04e071c97c
use own header for producing state to reduce compilation time 2023-11-16 15:55:19 +01:00
9887d104b8
better interface for cli 2023-11-16 15:14:31 +01:00
7dc9d41aa7
pass by const& 2023-11-16 15:06:45 +01:00
bdc65411ae
simplify types 2023-11-15 23:23:21 +01:00
6e0e88b97a
clean up imports 2023-11-15 23:07:39 +01:00
3244213daa
Split GameState into multiple files
This now allows to import a light-weight header containing
the abstract interface separately from the templated header
that manages the actual backtracking, thus speeding up compilation.
2023-11-15 22:58:09 +01:00
0dbeb6e202
remove unused hash function 2023-11-15 22:09:34 +01:00
4b427c40f9
Code cleanup: split download into parsing + downloads 2023-11-15 21:47:50 +01:00
6ce692a06f
improve program output and CLI documentation 2023-11-15 16:53:49 +01:00
ac4cf5e797
Fix unique ids to allow for discarded / lost cards 2023-11-14 14:32:49 +01:00
27b8c08ed4
more debug checks: do not use tablebase lookup and therefore check tablebase consistency 2023-11-14 13:19:33 +01:00
88cfbe21f3
set clue modifier to 0 by default 2023-11-14 13:13:49 +01:00