This repository showcases an implementation of an AI-powered code hacker π€ designed to solve problems from the Meta Hacker Cup 2024 π. With advanced Large Language Models (LLMs) like Google's Gemini or OpenAI's GPT-4o, this project highlights the cutting-edge capabilities of AI in competitive programming and algorithmic problem-solving. π‘π»
The following flowchart illustrates the problem-solving pipeline:
Ensure you have Python installed, and then run:
pip install -r requirements.txt
Download and extract the problem dataset as follows:
1.Get the Meta Hacker Cup 2024 Round 2 Data.
2.Extract the data into your preferred directory:
mkdir path_to_save_data
tar xvf contestData_2024_r2.tar -C path_to_save_data
Set your API key for Gemini using the GOOGLE_API_KEY environment variable:
export GOOGLE_API_KEY=your_api_key
Uses the AutoGen framework to generate a solution based on problem input.
python run_autogen.py \
<problem_id> \
<problem_name> \
<data_path>
Uses the LangChain framework to generate a solution to the problem input.
python run_langchain.py \
<problem_id> \
<problem_name> \
<data_path>
problem_id
: A unique identifier for the problem.problem_name
: The name of the problem (typically the directory name).data_path
: The directory where the problem dataset is stored.
After execution, Python code that solves the given problem will be generated in the data_path/problem_name directory.
Performance evaluation and benchmarking tools are under development and will be released in future updates.