The PDB-ANN project aims to implement one of the methodologies mentioned in the research paper - Optimal Search with Neural Networks: Challenges and Approaches.
Before you begin, ensure you have met the following requirements:
-
You have installed the latest version of LibTorch. Detailed instructions related to the installation of LibTorch can be found on the linked page.
-
This project extensively utilizes the nlohmann/json library to facilitate the conversion of models into JSON format. You can download the latest version of this library via JSON for Modern C++.
-
cxxopts is a lightweight C++ library used for parsing command-line arguments in this project. To get the latest version of cxxopts, visit the releases page.
Note: This project includes the
nlohmann/json
andcxxopts
libraries, so there's no need to download them manually.
To build PDB-ANN, follow these steps:
Linux:
git clone https://github.com/mgh5225/PDB-ANN.git
cd PDB-ANN
bash build.sh
Please be aware that you'll need to update the absolute path to LibTorch in the
CMakeLists.txt
file.
Once the build process is complete, you can initiate the program using the following commands:
Pattern Database + ANN
Usage:
main [OPTION...]
-h, --help Print usage
--pdb Create PDBs
--create Create random database based on created PDBs
-t, --train Train ANN
-r, --run Run ANN
-f, --find Find q*
run options:
-a, --all Run on whole dataset
-s, --state arg State for ANN
-p, --pattern arg Pattern for ANN
-d, --dim arg Dimension for ANN
-q arg List of q for ANN
the output of ./build/main -r --pattern 1,2,3,4 --state 8,7,3,0,4,5,1,6,2 --dim 3,3 -q 1e-2,1e-4,1
is as follows:
5.5599e-12 5.7679e-04 9.9942e-01 4.1235e-09 8.6619e-09 2.9172e-10
[ CPUFloatType{1,6} ]
q h
0.01 2
0.0001 1
1 2
This project uses the following license: MIT license