Skip to content

Perfect Database

Calcitem edited this page Jan 27, 2024 · 31 revisions

How to Download and Use the Perfect Database

English German Hungarian French Spanish Portuguese Russian SChinese TChinese Japanese

Introduction

This Wiki is tailored to guide users through the process of downloading and employing the perfect database for Nine Men's Morris and Twelve Men's Morris. It should be noted that the database is optimized for the standard rules of the game; applying it to non-standard rule sets may result in diminished playing strength.

Downloading the Database

Database Download Link: Click the link below for the torrent file to download the perfect database.

Download the File: Use the downloaded torrent file to complete the download and access the database files.

Configuration Steps

For Android

Transfer to Device: Copy the downloaded .secval, .statistics and .sec2 files to the Android\data\com.calcitem.sanmill\files\strong directory on your Android device's storage. Ensure that the copied files are placed directly within the strong directory, which should be named exactly as strong (NOT Strong) if it does not already exist. Additionally, ensure that there are no subdirectories within the strong directory itself.

Warning: The Android\data\com.calcitem.sanmill directory will be deleted if you uninstall the app. Consider backing up the strong directory before uninstalling. However, this directory will not be deleted if you are only upgrading the app version.

For iOS

Transfer to Device: Follow these steps to transfer the .secval, .statistics, and .sec2 files to your iOS device:

  1. Unzip and Rename: After downloading, unzip the files. Rename the containing directory to strong. Ensure that the name is exactly strong (case-sensitive, NOT Strong).

  2. Move to iOS Device:

    • Open Finder on your Mac.
    • Connect your iPhone or iPad to your Mac.
    • Your device should appear in the Finder sidebar under “Locations.”
    • Click on your device to open it.
    • From the top menu in the Finder window, select Files.
    • Scroll down to find the Mill app in the list.
    • Drag and drop the strong directory into the Mill folder.
  3. Verify Directory Level: Ensure that the strong directory is placed directly under the Mill folder. It should be at the same directory level as the Sanmill folder, if such a folder exists.

Reminder: Ensure that your device is unlocked and that you have given your Mac permission to access your device if prompted. If you don't see your device in Finder, disconnect and reconnect it, and make sure you trust the computer on your iOS device.

For Windows

File Transfer: Copy the downloaded .secval, .statistics and .sec2 files to the strong folder located in the "Documents" directory. If the strong folder does not exist, create one, ensuring the name is exactly strong (NOT Strong), and make sure there are no subdirectories within the strong folder.

Handling Insufficient Space with Symbolic Links: If the disk space where your "Documents" folder resides is insufficient, you can create the actual strong folder on another disk and create a symbolic link to it in the "Documents" directory.

For example:

  1. Create a folder on another drive (such as E: drive), with the path E:\Std_DD_89adjusted.

  2. Place the .secval, .statistics, and .sec2 files in E:\Std_DD_89adjusted.

  3. Open Command Prompt (as an administrator).

  4. Assuming the actual path of your "Documents" is D:\users\user\Documents, execute the following command:

    mklink /D "D:\users\user\Documents\strong" "E:\Std_DD_89adjusted"

    This command creates a symbolic link named strong in D:\users\user\Documents, pointing to the strong folder on the E: drive at E:\Std_DD_89adjusted.

For macOS

Transfer to Device: Follow these steps to transfer the .secval, .statistics, and .sec2 files to your macOS device:

  • Launch Finder on your Mac.

  • Press Command + Shift + G. In the dialog box, enter ~/Library/Containers and press return.

  • Open the Mill directory, then the Documents directory.

  • Create a new folder named strong, ensuring it is at the same directory level as the Sanmill folder, if present.

  • Copy the .secval, .statistics, and .sec2 files into the strong folder.

For Linux

File Transfer: To transfer the .secval, .statistics, and .sec2 files on a Linux system, follow these steps:

  1. Locate or Create the strong Folder: The strong folder should be located in your user's home directory, typically under ~/Documents. If this folder does not exist, create it using the following command in the terminal:

    mkdir -p ~/Documents/strong

    Ensure that the folder name is exactly strong (NOT Strong). The case is important in Linux file systems.

  2. Copy Files: Copy the downloaded files to the strong folder. You can do this using the command line or a file manager. For command line, use:

    cp Std_DD_89adjusted/*.secval Std_DD_89adjusted/*.statistics Std_DD_89adjusted/*.sec2 ~/Documents/strong/

    Replace Std_DD_89adjusted with the actual path where your files are located.

  3. No Subdirectories: Make sure there are no subdirectories within the strong folder. All files should be directly within this folder.

Handling Insufficient Space with Symbolic Links: If you are dealing with limited space in your home directory, you can create a symbolic link to the strong folder located in another partition or drive. Here’s how:

  1. Create a folder in another location (e.g., in another mounted drive or partition). For example:

    mkdir /mnt/other_partition/Std_DD_89adjusted
  2. Move or copy your .secval, .statistics, and .sec2 files to this new location.

  3. Create a symbolic link in your ~/Documents directory pointing to this new strong folder:

    ln -s /mnt/other_partition/Std_DD_89adjusted ~/Documents/strong

    This command links the strong folder in /mnt/other_partition/Std_DD_89adjusted to a symbolic link in your ~/Documents directory. The system will treat the symbolic link as if it were the actual folder.

Note: Ensure that you have the necessary permissions to create folders and symbolic links in the locations you choose. If required, use sudo for administrative privileges. Also, remember to replace the example paths with actual paths relevant to your system.

Partial File Usage for Limited Storage

If you have limited disk or storage space, you can opt to copy only a part of the .sec2 files to the directory. The game will use data from the .sec2 files if they are found. If the .sec2 files are not present, the game will revert to using traditional AI.

Using the Perfect Database

Once you've completed the above steps, the Mill game will automatically load the perfect database, enhancing your gameplay experience with higher precision.

When the option General Settings -> AI's playstyle -> Algorithm is not set to Random, the program will first use the specified Algorithm to calculate a move. This calculation often takes some time, depending on the Difficulty level and AI thinking time settings. Once the result is obtained, it is checked against the Perfect Database. If it is a move considered perfect by the Perfect Database, then that move is executed, and a + sign is added to the lower right corner of the robot icon. If the Perfect Database does not consider it a perfect move, then the perfect move, rather than the AI-calculated move, is executed. In this case, a bucket icon replaces the robot icon. If, due to missing files, the Perfect Database cannot be used to verify whether the move is perfect, then the original robot icon is displayed without change.

If the Algorithm option is set to Random, the program will not use the traditional algorithm for calculation but will directly consult the Perfect Database. When the option General Settings -> AI's playstyle -> Passive is not enabled, the program will try to ensure that at the end of the game, the number of its pieces is as many as possible compared to the opponent’s pieces, while ensuring a no-loss situation. If the Passive option is enabled, then the program, while ensuring a no-loss situation, will not actively try to maximize the number of its pieces relative to the opponent’s pieces.

Notes

  • Ensure the database files are in the correct directory.
  • If the game does not load the database, please verify your file path.

Developer Acknowledgment

The perfect database was developed by third parties, specifically Gábor Gévay and Gábor Danner.

Conclusion

By following these instructions, you can effectively utilize the perfect database, significantly enhancing your gameplay experience.

For any questions or further assistance, please feel free to contact us.

Clone this wiki locally