update installation instructions, usage
This commit is contained in:
parent
a1c3b3f8ef
commit
0c4367cd8a
1 changed files with 23 additions and 13 deletions
36
README.md
36
README.md
|
@ -36,7 +36,7 @@ I can't provide information for all distributions, but in general it should be l
|
||||||
- As an alternative, you can compile boost from source, refer to the [Boost Unix installation guide][boost-installation]. You will need to link against boost binary libraries as well (see section 5), specifically the 'Program Options' (and optionally 'Unit Test' if you want to compile them). For this, you can use `./bootstrap.sh --with-libraries=program_options` (or `--with-libraries=program_options,test`) to limit compilation of the boost libraries to only those you need. To install boost globally, run `sudo ./b2 install`, otherwise you will need to point CMake to your local installation and edit `CMakeLists.txt` acoordingly.
|
- As an alternative, you can compile boost from source, refer to the [Boost Unix installation guide][boost-installation]. You will need to link against boost binary libraries as well (see section 5), specifically the 'Program Options' (and optionally 'Unit Test' if you want to compile them). For this, you can use `./bootstrap.sh --with-libraries=program_options` (or `--with-libraries=program_options,test`) to limit compilation of the boost libraries to only those you need. To install boost globally, run `sudo ./b2 install`, otherwise you will need to point CMake to your local installation and edit `CMakeLists.txt` acoordingly.
|
||||||
- `readline` should be installed already, otherwise try your package manager as well. On some systems, you will need to additionally install `libreadline-dev` (or similar), since this includes the development headers needed for linking during compilation.
|
- `readline` should be installed already, otherwise try your package manager as well. On some systems, you will need to additionally install `libreadline-dev` (or similar), since this includes the development headers needed for linking during compilation.
|
||||||
- `cpr` should be fetched as a submodule from its GitHub repository automatically by CMake.
|
- `cpr` should be fetched as a submodule from its GitHub repository automatically by CMake.
|
||||||
- Alternatively, install cpr globally via your package manager (and edit `CMakeList.txt` accordingly to use `find_package`). For example, this is possible for Arch via [AUR](https://aur.archlinux.org/packages/cpr) and Fedora via [rpm](https://src.fedoraproject.org/rpms/cpr)
|
- Alternatively, install cpr globally via your package manager, see [Installing cpr via your system package manager][#Installing-cpr-via-your-system-package-manager].
|
||||||
|
|
||||||
**Mac OS**:
|
**Mac OS**:
|
||||||
- I recommend installing packages with [Homebrew](https://brew.sh).
|
- I recommend installing packages with [Homebrew](https://brew.sh).
|
||||||
|
@ -47,34 +47,44 @@ I can't provide information for all distributions, but in general it should be l
|
||||||
- I recommend using the 'Windows Subsystem for Linux (WSL)'. Then, follow the Linux system installation from above.
|
- I recommend using the 'Windows Subsystem for Linux (WSL)'. Then, follow the Linux system installation from above.
|
||||||
- WSL is the (currently) only tested installation method for Windows.
|
- WSL is the (currently) only tested installation method for Windows.
|
||||||
|
|
||||||
### Installing cpr as a local CMake dependency
|
### Installing cpr via your system package manager
|
||||||
- There is also the option to install `cpr` directly as a dependency through `CMake`.
|
By default, `cpr` is fetched by CMake during installation from its github origin.
|
||||||
For this, in `CMakeLists.txt`, replace the line
|
You can find details on this installation method on the [cpr github page](https://github.com/lipcpr/cpr) as well.
|
||||||
```
|
|
||||||
find_package(cpr)
|
Alternatively, you might want to install `cpr` globally on your system.
|
||||||
```
|
For example, this is possible for Arch via [AUR](https://aur.archlinux.org/packages/cpr) and Fedora via [rpm](https://src.fedoraproject.org/rpms/cpr)
|
||||||
with the lines
|
In this case, replace
|
||||||
```
|
```
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
||||||
GIT_TAG 2553fc41450301cd09a9271c8d2c3e0cf3546b73)
|
GIT_TAG 2553fc41450301cd09a9271c8d2c3e0cf3546b73)
|
||||||
FetchContent_MakeAvailable(cpr)
|
FetchContent_MakeAvailable(cpr)
|
||||||
```
|
```
|
||||||
You might need to replace the `GIT_TAG` with the latest release tag from [Github](https://github.com/libcpr/cpr/releases),
|
with
|
||||||
but the above should usually work.
|
```
|
||||||
You can find details on this installation method on the [cpr github page](https://github.com/lipcpr/cpr) as well.
|
find_package(cpr)
|
||||||
|
```
|
||||||
|
in `CMakeLists.txt`.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
For a detailed usage explanation, run `./endgame-analyzer --help`.
|
||||||
|
The general usage is as follows:
|
||||||
```
|
```
|
||||||
# ./endgame-analyzer (GAME_ID | GAME_FILE) TURN
|
# ./endgame-analyzer (-g GAME_ID | -f GAME_FILE) (-t TURN | -d DRAW_PILE_SIZE) [OPTIONS]
|
||||||
```
|
```
|
||||||
where
|
where
|
||||||
- `GAME_ID` is a game from hanab.live.
|
- `GAME_ID` is a game from hanab.live.
|
||||||
- `GAME_FILE` is a path to a file containing the game as JSON in the hanab.live format.
|
- `GAME_FILE` is a path to a file containing the game as JSON in the hanab.live format.
|
||||||
- `TURN` specifies the turn of the game state to analyze. Turn 1 is the state before actions have been taken.
|
- `TURN` specifies the turn of the game state to analyze. Turn 1 is the state before actions have been taken.
|
||||||
|
- `OPTIONS` is a list of further options to modify the running of the program, for example
|
||||||
|
- `--score-goal` to optimize for achieving a certain score not necessarily maximum.
|
||||||
|
- `--clue-modifier` to edit the base state and apply a relative modifier to the initial clue count
|
||||||
|
- `--save-memory` Reduce memory usage at the cost of execution time. This typically means 50% less memory, but a slowdown of 4-6 in runtime. You will likely only need this for extreme cases.
|
||||||
|
- `--version` Print version and compilation information for your program.
|
||||||
|
- `--recursive` Evaluates the game from the back until specified game state and prints information during evaluation. Also useful for infinite analysis, in case you are unsure which initial game state is solvable in feasible time.
|
||||||
|
|
||||||
Be cautious about specifying too low turn counts, your program will eventually run out of memory.
|
Be cautious about specifying too low turn counts, your program will eventually run out of memory.
|
||||||
Typically, turn counts where roughly 8 cards are still in the draw pile are reasonably fast,
|
Typically, turn counts where roughly 8-10 cards are still in the draw pile are reasonably fast,
|
||||||
but running times depend heavily on the exact game state you want to analyze.
|
but running times depend heavily on the exact game state you want to analyze.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue