https://github.com/arash-mansourpour/reinforcement-learning_ad-optimization
AI-powered ad optimization using Reinforcement Learning and Groq API to maximize click-through rates
https://github.com/arash-mansourpour/reinforcement-learning_ad-optimization
ad-optimization adtech artificial-intelligence q-learning reinforcement-learning reinforcement-learning-agent reinforcement-learning-algorithms reinforcement-learning-environment reinforcement-learning-environments reinforcement-learning-excercises reinforcement-learning-from-human-feedback reinforcement-learning-papers reinforcement-learning-playground reinforcement-learning-tutorials tkinter
Last synced: 6 days ago
JSON representation
AI-powered ad optimization using Reinforcement Learning and Groq API to maximize click-through rates
- Host: GitHub
- URL: https://github.com/arash-mansourpour/reinforcement-learning_ad-optimization
- Owner: Arash-Mansourpour
- License: apache-2.0
- Created: 2025-05-12T14:50:15.000Z (7 days ago)
- Default Branch: main
- Last Pushed: 2025-05-12T14:57:18.000Z (7 days ago)
- Last Synced: 2025-05-12T15:57:00.626Z (7 days ago)
- Topics: ad-optimization, adtech, artificial-intelligence, q-learning, reinforcement-learning, reinforcement-learning-agent, reinforcement-learning-algorithms, reinforcement-learning-environment, reinforcement-learning-environments, reinforcement-learning-excercises, reinforcement-learning-from-human-feedback, reinforcement-learning-papers, reinforcement-learning-playground, reinforcement-learning-tutorials, tkinter
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ad Optimization with RL and Groq
A smart ad optimization platform leveraging Reinforcement Learning (RL) and Groq API to maximize click-through rates (CTR). Built with a modern, dark-themed Tkinter UI, it offers intelligent ad recommendations and interactive campaign simulations.
FeaturesReinforcement Learning: Uses Q-Learning to optimize ad targeting, formats, and display times.
Groq API Integration: Generates compelling ad content and strategies via AI-powered conversations.
Interactive UI: Customize campaigns and simulate performance with real-time results.
Modular Design: Easy to extend with new ad types, audiences, or business types.Installation
Clone the repository:
git clone https://github.com/Arash-Mansourpour/Reinforcement-Learning_AD-Optimization.git
cd Reinforcement-Learning_AD-OptimizationInstall dependencies:Using Poetry (recommended):
poetry installOr with pip:
pip install -r requirements.txtSet up Groq API Key:
Obtain a valid Groq API key from xAI API.
Set the key as an environment variable:export GROQ_API_KEY="your_groq_api_key_here"Alternatively, update src/rlpro.py with your key (not recommended for public repositories):GROQ_API_KEY = "your_groq_api_key_here"
Usage
Run the application:
poetry run python src/rlpro.pyOr:
python src/rlpro.pyExplore the UI:
Campaign Optimization Tab: Select a business type, generate AI-driven recommendations, customize campaigns, and simulate ad performance.
Model Interaction Tab: Chat with the Groq-powered advertising assistant to create ads, get strategy suggestions, or ask questions.Example Interactions:
Input: "Create an ad for a coffee shop"
Output: JSON with headline, body, and CTA.Input: "Suggest ad strategies for a SaaS business"
Output: JSON with target audiences, ad types, display times, and goal.Input: "Hi"
Output: Friendly response asking about your ad needs.Project Structure
Reinforcement-Learning_AD-Optimization/
├── src/
│ └── rlpro.py # Main application code
├── .gitignore # Ignores Python cache and virtual env
├── .github/
│ └── workflows/
│ └── ci.yml # CI/CD pipeline
├── pyproject.toml # Poetry configuration
├── requirements.txt # Dependency list
└── README.md # Project documentationRequirements
Python 3.8+
Dependencies: groq==0.9.0, numpy==1.24.0, pandas==2.0.0, customtkinter==5.2.0
A valid Groq API keyContributing
Contributions are welcome! Please:Fork the repository.
Create a feature branch (git checkout -b feature/your-feature).
Commit your changes (git commit -m "Add your feature").
Push to the branch (git push origin feature/your-feature).
Open a pull request.License
This project is licensed under the MIT License. See the LICENSE file for details.
AcknowledgmentsBuilt with Groq API for AI-driven ad content.
Powered by Reinforcement Learning for intelligent ad optimization.
UI crafted with CustomTkinter for a modern look.