A Python tool that programmatically generates all possible combinations of recipes listed in Schedule 1, then prints them to a file.
-
Current Status: The tool is functional, but not yet optimized for performance.
- The recipe generation and deduplication processes are split into two separate scripts:
recipies.pyanddedupe.py.
- The recipe generation and deduplication processes are split into two separate scripts:
-
Known Issues:
- The deduplication script (
dedupe.py) is not fully functional and may not work as intended.- However for testing purposes, it can be run on a small set of ingredients to verify its functionality.
- The code does not currently deduplicate recipes that result in the same effects all in one script.
- The script may take a long time to run, especially with large ingredient sets.
- The tool consumes significant memory and CPU resources.
- The deduplication script (
-
Planned Improvements:
- Optimize the code to reduce runtime and memory usage.
- Merge the two scripts into a single script for better usability.
- Handle deduplication as new recipes are generated to avoid excessive file sizes.
- Generates every valid combination of Schedule 1 recipes.
- Outputs all results to a CSV file.
- Includes calculated Price, Profit, and Cost for each recipe.
- Uses shorthand notation for drugs, interactions, and mixins to minimize file size.
- Python 3.7+
- No external dependencies (pure Python)
- Clone the repository:
git clone https://github.com/MilkshakesBot/reverse_calc.git
cd reverse_calc- Run the script:
python recipies.pypython dedupe.py- Find the output files in the project directory (e.g.,
CE_part1.csv,MH_part1.csv).
The tool generates files typically named:
<shortened_name>_part1.csv
Each line represents a unique recipe configuration based on the Schedule 1 data.
Note: With 8 ingredients, the output can exceed 100 GB in size and generate over 500 differnt csv files per drug before deduplication. Each file has 1 million recipies. There are a total of 3 billion recipies with 8 ingredients. Adding more ingredients causes exponential growth in file size and combination count. Ensure sufficient disk space and memory capacity.
This project is licensed under the GNU General Public License v3.0.
Pull requests are welcome. For major changes, please open an issue first to discuss your proposed changes.