Welcome to the POLIS repository! This repository contains the code for Program Optimization with Local Search (POLIS), as presented in our paper titled "Can You Improve My Code? Optimizing Programs with Local Search". POLIS is designed to optimize Python-like programs by leveraging local search techniques to improve an objective function.
To install and set up the project, follow these steps:
-
Clone the repository:
git clone https://github.com/FatemehAB/POLIS.git cd POLIS -
Set up a virtual environment using Python 3.7 and install the required dependencies:
python3.7 -m venv venv source venv/bin/activate pip install -r requirements.txt
To utilize POLIS for program optimization, follow these steps:
-
Modify the configuration file (
config.yaml) to set the appropriate hyperparameters and file paths. -
Run the main script with these parameters:
path_to_config: The path to the config file.agent_num: A number that determines the trained agent to be used in the experiment.dirsave: The directory to save the result files.python main.py --path_to_config PATH_TO_CONFIG --agent_num AGENT_NUM --dirsave DIRECTORY
POLIS was evaluated with a user study, where participants were instructed and rewarded to write programs that maximized the score of two single-agent games: Lunar Lander and Highway.
The programs collected during the study are stored in the study-LunarLander and study-highway folders.
You can choose to use one of those programs or create your own program based on the Domain-Specific Language (DSL) defined in our paper for playing Lunar Lander or Highway games.
For comprehensive results and detailed performance metrics, please refer to the paper.
See the full paper at IJCAI 2023 website: https://www.ijcai.org/proceedings/2023/0328.pdf
For any questions or inquiries, please feel free to reach out to us via email at fabdolla [at] ualberta.ca. We appreciate your interest in our work and look forward to hearing from you!