Implementation of Reevaluable Possibility Space algorithm in Prolog
Before compiling and running the application, ensure that you have the following prerequisites installed: The stable version of Prolog Compiler (e.g., SWI-Prolog, https://www.swi-prolog.org)
- Clone the repository:
git clone https://github.com/monikavarga/RPS_algorithm.git- Change into the project directory:
cd YOUR ACTUAL DIRECTORY- Setting environment for using SVI Prolog:
sviprologvars.bat- Compilation of the executable:
swipl.exe -o RPS_algorithm.exe --foreign=save --autoload=true --stand_alone=true -c RPS_algorithm.pl Task.pl contains pre-configured run options for 'reevaluation' and 'propose' of solutions.
The content of task() predicate is as follows: % task(Program,From1,From2,To,Input_parameters). % Program = the algorithm to be executed % From1,From2 = the names of input files within '' % To = the name of output file within '' % Log = the name of the respective log file within '' % Input_parameters = the list of algorithm dependent input data within [] %Actually we use parameters only for the "propose" algorithm, as follows: % Input parameters = [Actual_rmax_number,Suggested_new rmax_number,Selected_strategy]
To use the predefined task() predicates, remove % from the beginning of the row to be actually used by the algorithm. The row can be edited, following the above syntactical rules.
Running of a task requires the rmax and rmin input files (defined in the task() predicate) in the root of main directory. Pre-configured rmax and rmin files can be found in and copied from the folders Rmax and Rmin.
To run the project, use the following command:
RPS_algorithmResult is prepared with the predefined name, according to the task() predicate.
This project is licensed under the MIT License.
For any questions or suggestions, feel free to reach out via GitHub issues.